Skip to content

Commit 4a87ef7

Browse files
author
Stephane Landelle
committed
Minor clean up
1 parent c809a50 commit 4a87ef7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, final HttpT
6060
.select(req.getURI());
6161
String principal = proxyServer.getPrincipal();
6262
String password = proxyServer.getPassword();
63-
Realm realm = new Realm.RealmBuilder().setPrincipal(principal).setPassword(password).setUri(req.getURI().withNewPath("/").withNewQuery(null))
63+
Realm realm = new Realm.RealmBuilder().setPrincipal(principal).setPassword(password).setUri(req.getURI().withNewPath("/")).setOmitQuery(true)
6464
.setMethodName(Method.CONNECT.getMethodString()).setUsePreemptiveAuth(true).parseProxyAuthenticateHeader(proxyAuth).build();
6565
String proxyAuthLowerCase = proxyAuth.toLowerCase(Locale.ENGLISH);
6666
if (proxyAuthLowerCase.startsWith("basic")) {

providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ private boolean handleProxyAuthenticationRequiredAndExit(int statusCode,//
300300
} else {
301301
newRealm = new Realm.RealmBuilder().clone(realm)//
302302
.setScheme(realm.getAuthScheme())//
303-
.setUri(request.getURI().withNewPath("/").withNewQuery(null))//
303+
.setUri(request.getURI().withNewPath("/"))//
304+
.setOmitQuery(true)//
304305
.setMethodName(HttpMethod.CONNECT.name())//
305306
.setUsePreemptiveAuth(true)//
306307
.parseProxyAuthenticateHeader(proxyAuthenticateHeaders.get(0))//

0 commit comments

Comments
 (0)