jira-importer opened a new issue, #1303: URL: https://github.com/apache/httpcomponents-core/issues/1303
**[Florin Slev](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER299708)** opened **[HTTPCORE-738](https://issues.apache.org/jira/browse/HTTPCORE-738?redirect=false)** and commented It seems Apache URIBuilder encodes URL asterisk characters as %2A. While java.lang.URI doesn't: ```java final URI uri = new URI("http", null, "localhost", 80, "/books*", null, null); final URIBuilder uribuilder = new URIBuilder().setScheme("http").setHost("localhost").setPort(80).setPath("/books*"); final URI result = uribuilder.build(); assertEquals(uri, result); ``` => ``` expected: <http://localhost:80/books*> but was: <http://localhost:80/books%2A> ``` According to https://www.rfc-editor.org/rfc/rfc1738.txt ``` Reserved: Usually a URL has the same interpretation when an octet is represented by a character and when it encoded. However, this is not true for reserved characters: encoding a character reserved for a particular scheme may change the semantics of a URL. Thus, only alphanumerics, the special characters "$-_.+!*'(),", and reserved characters used for their reserved purposes may be used unencoded within a URL. ``` Is the the encoding of asterisk and the whole set of special chars from the RFC above $-_.+!*'() intended inside Apache URIBuilder ? My use case is that I'm using Apache HTTP client to send requests to a remote endpoint containing * inside the URL. The server does not recognize the %2A encoding. I have to explicitly decode it back to asterisk * in order to work. --- **Affects:** 5.2.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]
