[ https://issues.apache.org/jira/browse/HTTPCLIENT-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765916#comment-16765916 ]
Cservenak, Tamas commented on HTTPCLIENT-1968: ---------------------------------------------- Would be good if the fix in HTTPCLIENT-1960 becomes somehow controlled (ie. from HttpContext?). Currently, we cannot upgrade our http client (used in proxy for Azure Docker registry) due to their "known issue": they emit redirect responses with paths having double slashes, and worse, they *expect those to be there* (as otherwise they claim requested resource is not there). With pre 4.5.7 HttpClient this worked fine for us with having custom {{RedirectStrategy}} in place. But since 4.5.7 (or better since HTTPCLIENT-1960 change), where URIUtil is changed to do this, the "ironing out" of double slashes happens across client and custom redirect strategy does not work either. See https://github.com/docker/distribution/issues/1247 > 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