You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2022/10/23 18:03:58 UTC

[httpcomponents-client] branch 5.1.x updated: HTTPCLIENT-2240: fixed incorrect CONNECT method initialization in ProxyClient

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch 5.1.x
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git


The following commit(s) were added to refs/heads/5.1.x by this push:
     new b5a90d57d HTTPCLIENT-2240: fixed incorrect CONNECT method initialization in ProxyClient
b5a90d57d is described below

commit b5a90d57da7abd10c36ffa8198b3080a487336c9
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sun Oct 23 19:59:05 2022 +0200

    HTTPCLIENT-2240: fixed incorrect CONNECT method initialization in ProxyClient
---
 .../main/java/org/apache/hc/client5/http/impl/classic/ProxyClient.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ProxyClient.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ProxyClient.java
index 1c8a4e59a..6bee9fa25 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ProxyClient.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ProxyClient.java
@@ -159,7 +159,7 @@ public class ProxyClient {
         final HttpContext context = new BasicHttpContext();
         ClassicHttpResponse response;
 
-        final ClassicHttpRequest connect = new BasicClassicHttpRequest(Method.CONNECT, host.toHostString());
+        final ClassicHttpRequest connect = new BasicClassicHttpRequest(Method.CONNECT, proxy, host.toHostString());
 
         final BasicCredentialsProvider credsProvider = new BasicCredentialsProvider();
         credsProvider.setCredentials(new AuthScope(proxy), credentials);