jira-importer opened a new issue, #1311:
URL: https://github.com/apache/httpcomponents-core/issues/1311

   **[Peter 
Halicky](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER308992)**
 opened 
**[HTTPCORE-778](https://issues.apache.org/jira/browse/HTTPCORE-778?redirect=false)**
 and commented
   
   URI fragment is encoded in URIBuilder using:
   
   ```java
   PercentCodec.encode(sb, this.fragment, this.charset); 
   ```
   
   (line 401, end of buildString method)
   
   This encodes all characters except UNRESERVED using the percent-format.
   
   As per (obsoleted) RFC2396, URI fragment should use URIC safe-chars.
   
   As per RFC3986, quite a bit more characters should not be encoded:
   
   ```java
   pct-encoded   = "%" HEXDIG HEXDIG
   unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
   sub-delims    = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / 
"="
   pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
   fragment    = *( pchar / "/" / "?" ) 
   ```
   
   Note that URIBuilder in httpclient 4.5.13 conforms to at least the old 
RFC2396, as it uses URIC set of safe characters (i.e. this is in fact a 
regression).
   
   
   ---
   
   **Affects:** 5.3.3
   
   **Backported to:** 
[5.3.4](https://github.com/apache/httpcomponents-core/milestone/99?closed=1)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to