[ https://issues.apache.org/jira/browse/HTTPCLIENT-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16771790#comment-16771790 ]
Colm O hEigeartaigh edited comment on HTTPCLIENT-1968 at 2/19/19 10:09 AM: --------------------------------------------------------------------------- The example I gave above for forward slashes now works, thanks for the fix. I still have some failing tests relating to an encoded exclamation mark though. If I specify "booksubresource/123/chapters/sub/1/matched%21uris?decode=true" as the URL, it preserved "%21" under the old behaviour, but is now changing it to ") not found." causing the test to fail. Colm. was (Author: coheigea): The example I gave above for forward slashes now works, thanks for the fix. I still have some failing tests relating to encoded "!" though. If I specify "booksubresource/123/chapters/sub/1/matched%21uris?decode=true" as the URL, it preserved "%21" under the old behaviour, but is now changing it to "!" causing the test to fail. Colm. > Encoded forward slashes are not preserved when rewriting URI > ------------------------------------------------------------ > > Key: HTTPCLIENT-1968 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1968 > Project: HttpComponents HttpClient > Issue Type: Bug > Affects Versions: 4.5.7 > Reporter: Jay Modi > Priority: Major > Fix For: 4.5.8, 5.0 Beta4 > > Attachments: rewrite_preserve_forward_slash.diff > > Time Spent: 3.5h > Remaining Estimate: 0h > > URIs that contain an encoded forward slash (%2F) are no longer preserved when > the HTTP client executes. I came across this when upgrading from 4.5.2 to > 4.5.7 and my requests that contained an encoded forward slash suddenly > started failing. The appears to be due to decoding and re-encoding of the > path that takes place in the URIUtils#rewriteURI method. I've attached a > patch that restores the old behavior but if a URI contains two slashes in a > row in addition to an encoded slash the encoded forward slash will be decoded. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org