Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.5
-
None
Description
Sorry for my English.
Class org.apache.http.client.methods.RequestBuilder in method build() FORCE to use ISO-8859-1 encoding
For example my using:
HttpUriRequest post = RequestBuilder.post().setUri(url) .setCharset(Charset.forName("Windows-1251")) .addParameter("xml", xml).build();
QuickFix (line ~481):
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);
I think it also may to be changed in other places in class.