hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Smitany (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HTTPCLIENT-1506) Including "; charset=..." in the content type header prevents form fields from getting transmitted?
Date Thu, 03 Jul 2014 11:25:24 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14051333#comment-14051333
] 

John Smitany edited comment on HTTPCLIENT-1506 at 7/3/14 11:25 AM:
-------------------------------------------------------------------

Sorry Oleg, I do not understand this: your suggested solution does not compile for me and
when looking at the JavaDoc, there seems to be no add method that takes three arguments:
http://hc.apache.org/httpcomponents-client-4.3.x/fluent-hc/apidocs/org/apache/http/client/fluent/Form.html
I could also not find an add method that would take that additional parameter in more recent
versions.


was (Author: johsmi93):
Sorry Oleg, I do not understand this: your suggested solution does not compile for me and
when looking at the JavaDoc, there seems to be no add method that takes three arguments:
http://hc.apache.org/httpcomponents-client-4.3.x/fluent-hc/apidocs/org/apache/http/client/fluent/Form.html
I could also not find an add method that would take that additional parameter in more recent
versions.

So why is this bug resolved as invalid?

> Including "; charset=..." in the content type header prevents form fields from getting
transmitted?
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1506
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1506
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Fluent HC, HttpClient
>    Affects Versions: 4.3.2
>            Reporter: John Smitany
>
> Running the following code works
> Request req = Request.Post(getAidaServiceUrl().toString());
> req.addHeader("Content-Type","application/x-www-form-urlencoded");
> req.bodyForm(Form.form().add("text", text).build()); 
> but the text will be transferred in iso-8859-1. However changing the second line to 
> eq.addHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
> completely prevents the text to get transferred to the server. 
> There should be a way to easily send UTF-8 somehow.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message