You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2016/02/20 00:33:14 UTC

svn commit: r1731313 - /httpcomponents/httpclient/branches/4.5.x/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java

Author: ggregory
Date: Fri Feb 19 23:33:14 2016
New Revision: 1731313

URL: http://svn.apache.org/viewvc?rev=1731313&view=rev
Log:
[HTTPCLIENT-1665] Regression in org.apache.http.entity.mime.MultipartEntity and org.apache.http.entity.mime.content.StringBody. Use ASCII when charset is null.

Modified:
    httpcomponents/httpclient/branches/4.5.x/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java

Modified: httpcomponents/httpclient/branches/4.5.x/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java?rev=1731313&r1=1731312&r2=1731313&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java Fri Feb 19 23:33:14 2016
@@ -110,7 +110,7 @@ public class StringBody extends Abstract
             final String text,
             final String mimeType,
             final Charset charset) throws UnsupportedEncodingException {
-        this(text, ContentType.create(mimeType, charset));
+        this(text, ContentType.create(mimeType, charset != null ? charset : Consts.ASCII));
     }
 
     /**