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 2019/03/18 08:29:26 UTC

[httpcomponents-client] branch PR-143 created (now 07bd2e2)

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

olegk pushed a change to branch PR-143
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git.


      at 07bd2e2   Changed route tracking of proxy to not default to false

This branch includes the following new commits:

     new 07bd2e2   Changed route tracking of proxy to not default to false

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[httpcomponents-client] 01/01: Changed route tracking of proxy to not default to false

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 07bd2e26fce7b25900ec0f866ce69d172985d98c
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Mon Mar 18 09:28:31 2019 +0100

     Changed route tracking of proxy to not default to false
---
 .../java/org/apache/hc/client5/http/impl/async/AsyncConnectExec.java    | 2 +-
 .../main/java/org/apache/hc/client5/http/impl/classic/ConnectExec.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncConnectExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncConnectExec.java
index 5aad68d..9c9ae56 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncConnectExec.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncConnectExec.java
@@ -223,7 +223,7 @@ public final class AsyncConnectExec implements AsyncExecChainHandler {
                         @Override
                         public void completed(final AsyncExecRuntime execRuntime) {
                             final HttpHost proxy  = route.getProxyHost();
-                            tracker.connectProxy(proxy, false);
+                            tracker.connectProxy(proxy, route.isSecure() && !route.isTunnelled());
                             log.debug("Connected to proxy");
                             proceedToNextHop(state, request, entityProducer, scope, chain, asyncExecCallback);
                         }
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ConnectExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ConnectExec.java
index abafdad..6517c45 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ConnectExec.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ConnectExec.java
@@ -132,7 +132,7 @@ public final class ConnectExec implements ExecChainHandler {
                         case HttpRouteDirector.CONNECT_PROXY:
                             execRuntime.connectEndpoint(context);
                             final HttpHost proxy  = route.getProxyHost();
-                            tracker.connectProxy(proxy, false);
+                            tracker.connectProxy(proxy, route.isSecure() && !route.isTunnelled());
                             break;
                         case HttpRouteDirector.TUNNEL_TARGET: {
                             final boolean secure = createTunnelToTarget(route, request, execRuntime, context);