Skip to content

Commit aa1afe0

Browse files
committed
Remove the checking of "redirecting to the same url".
1 parent a941ebd commit aa1afe0

File tree

2 files changed

+4
-4
lines changed
  • providers
    • netty3/src/main/java/org/asynchttpclient/netty/handler
    • netty4/src/main/java/org/asynchttpclient/netty/handler

2 files changed

+4
-4
lines changed

providers/netty3/src/main/java/org/asynchttpclient/netty/handler/Protocol.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected boolean exitAfterHandlingRedirect(//
126126
String location = responseHeaders.get(HttpHeaders.Names.LOCATION);
127127
Uri uri = Uri.create(future.getUri(), location);
128128

129-
if (!uri.equals(future.getUri())) {
129+
//if (!uri.equals(future.getUri())) {
130130

131131
// if we are to strictly handle 302, we should keep the
132132
// original method (which browsers don't)
@@ -187,7 +187,7 @@ protected boolean exitAfterHandlingRedirect(//
187187

188188
requestSender.sendNextRequest(nextRequest, future);
189189
return true;
190-
}
190+
//}
191191
}
192192
}
193193
return false;

providers/netty4/src/main/java/org/asynchttpclient/netty/handler/Protocol.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected boolean exitAfterHandlingRedirect(//
121121
String location = responseHeaders.get(HttpHeaders.Names.LOCATION);
122122
Uri uri = Uri.create(future.getUri(), location);
123123

124-
if (!uri.equals(future.getUri())) {
124+
//if (!uri.equals(future.getUri())) {
125125
String originalMethod = request.getMethod();
126126
boolean switchToGet = !originalMethod.equals("GET") && (statusCode == 303 || (statusCode == 302 && !config.isStrict302Handling()));
127127

@@ -181,7 +181,7 @@ protected boolean exitAfterHandlingRedirect(//
181181
}
182182

183183
return true;
184-
}
184+
//}
185185
}
186186
}
187187
return false;

0 commit comments

Comments
 (0)