arturobernalg commented on code in PR #517: URL: https://github.com/apache/httpcomponents-core/pull/517#discussion_r1997284724
########## httpcore5/src/test/java/org/apache/hc/core5/net/TestURIBuilder.java: ########## @@ -617,7 +618,7 @@ void testHttpHost() throws Exception { @Test void testSetHostWithReservedChars() throws Exception { - final URIBuilder uribuilder = new URIBuilder(); + final URIBuilder uribuilder = new URIBuilder().setEncodingPolicy(URIBuilder.EncodingPolicy.ALL_RESERVED); Review Comment: done ########## httpcore5/src/test/java/org/apache/hc/core5/net/TestURIBuilder.java: ########## @@ -171,7 +171,7 @@ void testFormatQuery() { @Test void testHierarchicalUri() throws Exception { final URI uri = new URI("http", "stuff", "localhost", 80, "/some stuff", "param=stuff", "fragment"); - final URIBuilder uribuilder = new URIBuilder(uri); + final URIBuilder uribuilder = new URIBuilder(uri).setEncodingPolicy(URIBuilder.EncodingPolicy.ALL_RESERVED); Review Comment: done ########## httpcore5/src/main/java/org/apache/hc/core5/net/URIBuilder.java: ########## @@ -175,6 +203,22 @@ public URIBuilder setCharset(final Charset charset) { return this; } + /** + * Sets the encoding policy for this {@link URIBuilder}. + * The encoding policy determines how URI components (e.g., query, fragment) are + * percent-encoded when building the URI string. If not set, the default policy + * is {@link EncodingPolicy#RFC_3986}. + * + * @param encodingPolicy the encoding policy to apply, or {@code null} to reset + * to the default ({@link EncodingPolicy#RFC_3986}) Review Comment: corrected -- 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: dev-unsubscr...@hc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org