diff --git a/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java b/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java index 535ce4b28..1bfbac2c3 100644 --- a/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java +++ b/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java @@ -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)); } /**