arturobernalg commented on code in PR #904:
URL: 
https://github.com/apache/httpcomponents-client/pull/904#discussion_r4375167646


##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/DefaultRedirectStrategy.java:
##########
@@ -185,9 +185,11 @@ protected URI createLocationURI(final String location) 
throws ProtocolException
             final String host = b.getHost();
             if (host != null) {
                 b.setHost(host.toLowerCase(Locale.ROOT));
-            }
-            if (b.isPathEmpty()) {
-                b.setPathSegments("");
+                // Only an absolute URI gets an empty path replaced with "/". 
A relative reference

Review Comment:
   Minor nit: //example.com/path is a relative reference with an authority 
component, so the comment "Only an absolute URI" is not quite accurate.



-- 
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