You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2021/06/09 20:42:00 UTC

[jira] [Comment Edited] (HTTPCORE-679) URIBuilder in 5.1 encodes more characters than necessary

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

Michael Osipov edited comment on HTTPCORE-679 at 6/9/21, 8:41 PM:
------------------------------------------------------------------

This seems to be subject to path-noscheme.


was (Author: michael-o):
This seems to be subject to path-rootless.

> URIBuilder in 5.1 encodes more characters than necessary
> --------------------------------------------------------
>
>                 Key: HTTPCORE-679
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-679
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 5.1
>            Reporter: Siqi Li
>            Priority: Minor
>
> Take this simple code example:
> {code:java}
> System.out.println(new URIBuilder().setScheme("https").setHost("example.com").setPathSegments("foo:bar").toString());
> {code}
> In 5.0 and in 4.x, this code would produce 
> {code:java}
> https://example.com/foo:bar
> {code}
> Since 5.1, the behavior has changed. It now produces
> {code:java}
> https://example.com/foo%3Abar
> {code}
> This actually broke one of my calls to iap.googleapis.com. I know it can be argued that it's the server's fault for not decoding %3A, but ':' does not actually need to be encoded in URL path segments. Also, this is an unnecessary breaking change in URIBuilder's behavior.



--
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