[ https://issues.apache.org/jira/browse/HTTPCLIENT-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16757546#comment-16757546 ]
Jay Modi commented on HTTPCLIENT-1968: -------------------------------------- The key statement in both links regarding equivalence and normalization are: RFC 2616: {quote}Characters other than those in the "reserved" and "unsafe" sets (see RFC 2396 [??[42]??|https://greenbytes.de/tech/webdav/rfc2616.html#RFC2396]) are equivalent to their ""%" HEX HEX" encoding. {quote} RFC 7230: {quote}Characters other than those in the "reserved" set are equivalent to their percent-encoded octets: the normal form is to not encode them (see Sections [2.1|https://tools.ietf.org/html/rfc3986#section-2.1] and [2.2|https://tools.ietf.org/html/rfc3986#section-2.2] of [??[RFC3986]??|https://greenbytes.de/tech/webdav/rfc7230.html#RFC3986]). {quote} > 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