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


##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/DefaultRedirectStrategy.java:
##########
@@ -80,6 +83,36 @@ public boolean isRedirectAllowed(
         return true;
     }
 
+    private boolean isSameAuthority(final HttpHost h1, final HttpHost h2) {
+        if (h1 == null || h2 == null) {
+            return false;
+        }
+        final String host1 = h1.getHostName();
+        final String host2 = h2.getHostName();
+        if (!host1.equalsIgnoreCase(host2)) {
+            return false;
+        }
+        final int port1 = getEffectivePort(h1);
+        final int port2 = getEffectivePort(h2);
+        return port1 == port2;
+    }
+
+    private int getEffectivePort(final HttpHost endpoint) {

Review Comment:
   @ok2c please do another pass



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

Reply via email to