You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "synth3 (Jira)" <ji...@apache.org> on 2020/09/11 16:49:00 UTC

[jira] [Comment Edited] (HTTPCLIENT-2117) Raw Query Parameters are not encoded correctly anymore

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

synth3 edited comment on HTTPCLIENT-2117 at 9/11/20, 4:48 PM:
--------------------------------------------------------------

[~olegk] I don't know about 4.4x but it has the behavior that I expected (encodes the URIs) with 4.5.12 (the latest 4.x version I think).

Anyway - its not a big deal for me because luckily had testcases for that.
 I just wanted to help... ;)

Anyway - thanks for your time.


was (Author: synth3):
[~olegk] I don't know about 4.4x but it has the behavior that I expected (encodes the URIs) with 4.5.12 (the latest 4.x version I think).

Anyway - its not a big deal for me because lucyly I had testcases for that.
I just wanted to help... ;)


Anyway - thanks for your time.

> Raw Query Parameters are not encoded correctly anymore
> ------------------------------------------------------
>
>                 Key: HTTPCLIENT-2117
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2117
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 5.0.1
>            Reporter: synth3
>            Priority: Minor
>
> In HC 4.x it was possible to include raw query parameters in the request-URI, now it seems that they have to be encoded.
> Example working in HC 4.x:
> {code:java}
> HttpGet get = new HttpGet("http://localhost/path?stringVal=theTestString€");
> CloseableHttpClient client = HttpClients.createDefault();
> client.execute(get);
> {code}
> When executed in HC 5.0.1 an HTTP server receives "theTestString?" as value of the query parameter "stringVal".
>  
> To make it work in HC 5.0.1 an encoded form has to be used, e.g.:
> {code:java}
> HttpGet get = new HttpGet("http://localhost/path?stringVal=theTestString%E2%82%AC");
> {code}
> A possible workaround could be something like the following:
> {code:java}
> HttpGet get = new HttpGet(URI.create("http://localhost/path?stringVal=theTestString€").toASCIIString());{code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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