[HTTPCLIENT-1665] Regression in org.apache.http.entity.mime.MultipartEntity and org.apache.http.entity.mime.content.StringBody. Use ASCII when charset is null.

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1731313 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2016-02-19 23:33:14 +00:00
parent 96c4a55029
commit 04fb7e6d8e
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ public class StringBody extends AbstractContentBody {
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));
}
/**