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


##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/DefaultRedirectStrategy.java:
##########
@@ -111,6 +111,9 @@ private boolean isSameAuthority(final HttpHost h1, final 
HttpHost h2) {
         if (h1 == null || h2 == null) {
             return false;
         }
+        if (!h1.getSchemeName().equalsIgnoreCase(h2.getSchemeName())) {

Review Comment:
   Fair enough. Still, this changes the boundary from authority to origin and 
extends the existing rejection policy to scheme changes. That needs a clear 
rationale, and the method should be renamed to isSameOrigin.



##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/DefaultRedirectStrategy.java:
##########
@@ -111,6 +111,9 @@ private boolean isSameAuthority(final HttpHost h1, final 
HttpHost h2) {
         if (h1 == null || h2 == null) {
             return false;
         }
+        if (!h1.getSchemeName().equalsIgnoreCase(h2.getSchemeName())) {

Review Comment:
   Fair enough. Still, this changes the boundary from authority to origin and 
extends the existing rejection policy to scheme changes. That needs a clear 
rationale, and the method should be renamed to `isSameOrigin`.



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