diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java index ed680ad7065..1769ff32085 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java @@ -159,7 +159,7 @@ public class HttpConnection extends AbstractConnection implements Connection path = "/"; request.path(path); } - if (destination.isProxied() && HttpMethod.CONNECT != request.getMethod()) + if (destination.isProxied() && HttpMethod.CONNECT != method) { path = request.getURI().toString(); request.path(path); diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpRequest.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpRequest.java index 6320ef5ab25..458dca3d92d 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpRequest.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpRequest.java @@ -152,6 +152,7 @@ public class HttpRequest implements Request if (query != null) { this.query = query; + params.clear(); extractParams(query); } this.uri = buildURI();