hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HTTPCLIENT-1195) URIBuilder-created query strings are double-escaped
Date Sun, 24 Jun 2012 12:48:43 GMT

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

Sebb edited comment on HTTPCLIENT-1195 at 6/24/12 12:47 PM:
------------------------------------------------------------

I've recovered TestUriEscapes.java@1349668 because it seems to still be appropriate.

The following tests fail:

testEscapedSpaceInPathAbsolute
testEscapedAmpersandInQueryAbsolute
testEscapedSpaceInQueryAbsolute

whereas the corresponding relative tests work OK.
                
      was (Author: sebb@apache.org):
    I've recovered TestUriEscapes.java@1349668 because it seems to still be appropriate.

The following tests fail:

testEscapedSpaceInPathAbsolute
testEscapedSpaceInPathAbsolute
testEscapedSpaceInQueryAbsolute

whereas the corresponding relative tests work OK.
                  
> URIBuilder-created query strings are double-escaped
> ---------------------------------------------------
>
>                 Key: HTTPCLIENT-1195
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1195
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.2 Final
>         Environment: java version "1.6.0_24"
> OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3)
> OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
>            Reporter: Chris K. Jester-Young
>             Fix For: 4.2.1
>
>
> When setting parameters in URIBuilder, the keys and values are double-escaped: once in
URIBuilder.build(), and again in URI.appendSchemeSpecificPart(). Example:
>     URIBuilder ub = new URIBuilder("http://www.google.com/");
>     ub.addParameter("foo=bar", "baz&qux");
>     ub.build();   // http://www.google.com/?foo%253Dbar=baz%2526qux
> In order to avoid this problem, URIBuilder.build() should use URI's one-argument constructor,
which does not try to do extra escaping.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message