HTTPCLIENT-1667: RequestBuilder does not take charset into account when creating UrlEncodedFormEntity
Contributed by Sergey Smith <smithsv at bk.ru> git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1692404 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c6be20feb0
commit
3b94921d03
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue