hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1692404 - /httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java
Date Thu, 23 Jul 2015 15:25:56 GMT
Author: olegk
Date: Thu Jul 23 15:25:56 2015
New Revision: 1692404

URL: http://svn.apache.org/r1692404
Log:
HTTPCLIENT-1667: RequestBuilder does not take charset into account when creating UrlEncodedFormEntity
Contributed by Sergey Smith <smithsv at bk.ru>

Modified:
    httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java?rev=1692404&r1=1692403&r2=1692404&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java
(original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java
Thu Jul 23 15:25:56 2015
@@ -463,7 +463,7 @@ public class RequestBuilder {
         if (parameters != null && !parameters.isEmpty()) {
             if (entityCopy == null && (HttpPost.METHOD_NAME.equalsIgnoreCase(method)
                     || HttpPut.METHOD_NAME.equalsIgnoreCase(method))) {
-                entityCopy = new UrlEncodedFormEntity(parameters, HTTP.DEF_CONTENT_CHARSET);
+                entityCopy = new UrlEncodedFormEntity(parameters, charset != null ? charset
: HTTP.DEF_CONTENT_CHARSET);
             } else {
                 try {
                     uriNotNull = new URIBuilder(uriNotNull)



Mime
View raw message