[ https://issues.apache.org/jira/browse/HTTPCLIENT-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16756061#comment-16756061 ]
Colm O hEigeartaigh commented on HTTPCLIENT-1968: ------------------------------------------------- I'm also hitting this issue in the CXF system tests. The scenario is a GET request to this address: "http://localhost:port/bookstore/bookurl/http%3A%2F%2Ftest.com%2Frss%2F123" With HTTP client 4.5.6 it produced: REQUEST for //localhost:20301/bookstore/bookurl/http%3A%2F%2Ftest.com%2Frss%2F123 on HttpChannelOverHttp@306dc3f4\{r=1,c=false,a=IDLE,uri=//localhost:20301/bookstore/bookurl/http%3A%2F%2Ftest.com%2Frss%2F123,age=1} However with 4.5.7 it produces: REQUEST for //localhost:40501/bookstore/bookurl/http:/test.com/rss/123 on HttpChannelOverHttp@2d4c6e5d\{r=1,c=false,a=IDLE,uri=//localhost:40501/bookstore/bookurl/http:/test.com/rss/123,age=1} Note that it is mapping %2F%2F to a single forward slash here. > 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 > Attachments: rewrite_preserve_forward_slash.diff > > > 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