Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
5.1
-
None
-
None
Description
Take this simple code example:
System.out.println(new URIBuilder().setScheme("https").setHost("example.com").setPathSegments("foo:bar").toString());
In 5.0 and in 4.x, this code would produce
https://example.com/foo:bar
Since 5.1, the behavior has changed. It now produces
https://example.com/foo%3Abar
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.