You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Omar Alkhateeb <om...@checkpoint.com> on 2019/01/09 14:54:35 UTC

Http CONNECT Method with XFF Header

Hi All,

As I noticed, there is no Class for HttpConnect method

I need to add specific Http Header on CONNECT which is called X-For-Forward

I can successfully add XFF Header on HttpGet Request using :

HttpClientContext context = HttpClientContext.create();
HttpGet httpget = new HttpGet(URL);
RequestConfig requestConfig = RequestConfig.copy(defaultRequestConfig)
        .setProxy(new HttpHost(Proxy, Port))
        .build();
httpget.setConfig(requestConfig);
httpget.setHeader("X-Forwarded-For", XFFHeader);
httpget.setHeader(new BasicHeader("Prama", "no-cache"));
httpget.setHeader(new BasicHeader("Cache-Control", "no-cache"));
httpget.setHeader("X-Requested-With", "XMLHttpRequest");
httpget.setHeader(HttpHeaders.USER_AGENT,"Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
+ "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Chrome/69.0.3497.100 "
+ "Apache-HttpClient/4.5.3 (Java/1.8.0_141)");

Is there a way to Add the same Header to CONNECT method ?

My Traffic for Connect is as shown (Can't find way to add XFF Header Here ):

<43 4f 4e 4e 45 43 54 20 77 77 77 2e 79 6f 75 74     CONNECT www.yout;
16:  75 62 65 2e 63 6f 6d 3a 34 34 33 20 48 54 54 50     ube.com:443 HTTP;
32:  2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 77 77 77 2e     /1.1..Host: www.;
48:  79 6f 75 74 75 62 65 2e 63 6f 6d 0d 0a 55 73 65     youtube.com..Use;
64:  72 2d 41 67 65 6e 74 3a 20 41 70 61 63 68 65 2d     r-Agent: Apache-;
80:  48 74 74 70 43 6c 69 65 6e 74 2f 34 2e 35 2e 33     HttpClient/4.5.3;
96:  20 28 4a 61 76 61 2f 31 2e 38 2e 30 5f 31 34 31      (Java/1.8.0_141;
112:  29 0d 0a 0d 0a>                                     )....;

0: <47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a     GET / HTTP/1.1..;
16:  58 2d 46 6f 72 77 61 72 64 65 64 2d 46 6f 72 3a     X-Forwarded-For:;
32:  20 31 30 2e 35 32 2e 31 30 36 2e 38 39 0d 0a 50      10.52.106.89..P;
48:  72 61 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a     rama: no-cache..;
64:  43 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 6e     Cache-Control: n;
80:  6f 2d 63 61 63 68 65 0d 0a 58 2d 52 65 71 75 65     o-cache..X-Reque;
96:  73 74 65 64 2d 57 69 74 68 3a 20 58 4d 4c 48 74     sted-With: XMLHt;
112:  74 70 52 65 71 75 65 73 74 0d 0a 55 73 65 72 2d     tpRequest..User-;
128:  41 67 65 6e 74 3a 20 4d 6f 7a 69 6c 6c 61 2f 35     Agent: Mozilla/5;
144:  2e 30 20 28 57 69 6e 64 6f 77 73 20 4e 54 20 31     .0 (Windows NT 1;
160:  30 2e 30 3b 20 57 69 6e 36 34 3b 20 78 36 34 29     0.0; Win64; x64);
176:  20 41 70 70 6c 65 57 65 62 4b 69 74 2f 35 33 37      AppleWebKit/537;
192:  2e 33 36 20 28 4b 48 54 4d 4c 2c 20 6c 69 6b 65     .36 (KHTML, like;
208:  20 47 65 63 6b 6f 29 20 43 68 72 6f 6d 65 2f 36      Gecko) Chrome/6;
224:  39 2e 30 2e 33 34 39 37 2e 31 30 30 20 53 61 66     9.0.3497.100 Saf;
240:  61 72 69 2f 35 33 37 2e 33 36 20 43 68 72 6f 6d     ari/537.36 Chrom;
256:  65 2f 36 39 2e 30 2e 33 34 39 37 2e 31 30 30 20     e/69.0.3497.100 ;
272:  41 70 61 63 68 65 2d 48 74 74 70 43 6c 69 65 6e     Apache-HttpClien;
288:  74 2f 34 2e 35 2e 33 20 28 4a 61 76 61 2f 31 2e     t/4.5.3 (Java/1.;
304:  38 2e 30 5f 31 34 31 29 0d 0a 48 6f 73 74 3a 20     8.0_141)..Host: ;
320:  77 65 62 2e 77 68 61 74 73 61 70 70 2e 63 6f 6d     web.whatsapp.com;
336:  0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 4b 65     ..Connection: Ke;
352:  65 70 2d 41 6c 69 76 65 0d 0a 41 63 63 65 70 74     ep-Alive..Accept;
368:  2d 45 6e 63 6f 64 69 6e 67 3a 20 67 7a 69 70 2c     -Encoding: gzip,;
384:  64 65 66 6c 61 74 65 0d 0a 0d 0a>                   deflate....;

Omar Khateeb | QA Engineer, IDA & DLP
Check Point Software Technologies <http://www.checkpoint.com/> | * omark@checkpoint.com<ma...@checkpoint.com>


Re: Http CONNECT Method with XFF Header

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2019-01-10 at 14:05 +0000, Omar Alkhateeb wrote:
> I tried this but fails
> 
> CloseableHttpClient client =
> HttpClientBuilder.create().addInterceptorLast( 
>                         new HttpRequestInterceptor() {
>                             @Override
>                             public void process(final HttpRequest
> request, final HttpContext context)
>                                     throws HttpException, IOException
> {
>                                 final String PROXY_CONN_DIRECTIVE =
> "Proxy-Connection";
>                                 Args.notNull(request, "HTTP
> request");
> 
>                                 final String method =
> request.getRequestLine().getMethod();
>                                 if
> (method.equalsIgnoreCase("CONNECT")) 
>                                 {
>                                     request.setHeader(PROXY_CONN_DIRE
> CTIVE, org.apache.http.protocol.HTTP.CONN_KEEP_ALIVE);
>                                     request.setHeader("X-Forwarded-
> For", "10.52.106.89");
>                                     return;
>                                 }
>                             }
>                         }   
>                 )
>                 .setConnectionManager(connectionManager)
>                 .setRedirectStrategy(new LaxRedirectStrategy())
> //                //.setDefaultHeaders(defaultHeaders)
> //                //.setRoutePlanner(routePlanner)
>                 .build();
> 
> What do you thinks ?
> 
> Omar Khateeb | QA Engineer, IDA & DLP

That is certainly not what I suggested you should do

Oleg

> 
> -----Original Message-----
> From: Omar Alkhateeb [mailto:omark@checkpoint.com] 
> Sent: Thursday, January 10, 2019 3:16 PM
> To: HttpComponents Project
> Subject: RE: Http CONNECT Method with XFF Header
> 
> I found this class, but can't edit because it is .class binary file
> 
> public class RequestClientConnControl implements
> HttpRequestInterceptor {
> 
>     private final Log log = LogFactory.getLog(getClass());
> 
>     private static final String PROXY_CONN_DIRECTIVE = "Proxy-
> Connection";
> 
>     public RequestClientConnControl() {
>         super();
>     }
> 
>     public void process(final HttpRequest request, final HttpContext
> context)
>             throws HttpException, IOException {
>         Args.notNull(request, "HTTP request");
> 
>         final String method = request.getRequestLine().getMethod();
>         if (method.equalsIgnoreCase("CONNECT")) {
>             request.setHeader(PROXY_CONN_DIRECTIVE,
> HTTP.CONN_KEEP_ALIVE);
>             return;
>         }
> 
> Omar Khateeb | QA Engineer, IDA & DLP
> Check Point Software Technologies | | omark@checkpoint.com
> 
> 
> -----Original Message-----
> From: Omar Alkhateeb [mailto:omark@checkpoint.com] 
> Sent: Thursday, January 10, 2019 3:15 PM
> To: HttpComponents Project
> Subject: RE: Http CONNECT Method with XFF Header
> 
> Hi Oleg,
> 
> Thanks for the response, Can you show me example of the steps you
> guided me, I can't find a way
> 
> Omar Khateeb | QA Engineer, IDA & DLP
> Check Point Software Technologies | | omark@checkpoint.com
> 
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org] 
> Sent: Wednesday, January 09, 2019 6:38 PM
> To: HttpComponents Project
> Subject: Re: Http CONNECT Method with XFF Header
> 
> On Wed, 2019-01-09 at 14:54 +0000, Omar Alkhateeb wrote:
> > Hi All,
> > 
> > As I noticed, there is no Class for HttpConnect method
> > 
> > I need to add specific Http Header on CONNECT which is called X-
> > For-
> > Forward
> > 
> > I can successfully add XFF Header on HttpGet Request using :
> > 
> > HttpClientContext context = HttpClientContext.create();
> > HttpGet httpget = new HttpGet(URL);
> > RequestConfig requestConfig =
> > RequestConfig.copy(defaultRequestConfig)
> >         .setProxy(new HttpHost(Proxy, Port))
> >         .build();
> > httpget.setConfig(requestConfig);
> > httpget.setHeader("X-Forwarded-For", XFFHeader);
> > httpget.setHeader(new BasicHeader("Prama", "no-cache"));
> > httpget.setHeader(new BasicHeader("Cache-Control", "no-cache"));
> > httpget.setHeader("X-Requested-With", "XMLHttpRequest");
> > httpget.setHeader(HttpHeaders.USER_AGENT,"Mozilla/5.0 (Windows NT
> > 10.0; Win64; x64) "
> > + "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100
> > Safari/537.36 Chrome/69.0.3497.100 "
> > + "Apache-HttpClient/4.5.3 (Java/1.8.0_141)");
> > 
> > Is there a way to Add the same Header to CONNECT method ?
> > 
> 
> It will not be pretty with HttpClient 4.5 but it can be done.
> 
> 1. Subclass HttpClientBuilder
> 
> 2. override #createMainExec method
> 
> 
https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java#L889
>  
> 
> 3. Hijack proxyHttpProcessor
> 
> Hope this helps
> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 
> 
> Email secured by Check Point
> B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
> KKCB��[��X��ܚX�KK[XZ[
> �]�][��X��ܚX�P˘\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
> �]�Z[˘\X�K�ܙ�B�
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


RE: Http CONNECT Method with XFF Header

Posted by Omar Alkhateeb <om...@checkpoint.com>.
I tried this but fails

CloseableHttpClient client = HttpClientBuilder.create().addInterceptorLast( 
                        new HttpRequestInterceptor() {
                            @Override
                            public void process(final HttpRequest request, final HttpContext context)
                                    throws HttpException, IOException {
                                final String PROXY_CONN_DIRECTIVE = "Proxy-Connection";
                                Args.notNull(request, "HTTP request");

                                final String method = request.getRequestLine().getMethod();
                                if (method.equalsIgnoreCase("CONNECT")) 
                                {
                                    request.setHeader(PROXY_CONN_DIRECTIVE, org.apache.http.protocol.HTTP.CONN_KEEP_ALIVE);
                                    request.setHeader("X-Forwarded-For", "10.52.106.89");
                                    return;
                                }
                            }
                        }   
                )
                .setConnectionManager(connectionManager)
                .setRedirectStrategy(new LaxRedirectStrategy())
//                //.setDefaultHeaders(defaultHeaders)
//                //.setRoutePlanner(routePlanner)
                .build();

What do you thinks ?

Omar Khateeb | QA Engineer, IDA & DLP
Check Point Software Technologies | | omark@checkpoint.com


-----Original Message-----
From: Omar Alkhateeb [mailto:omark@checkpoint.com] 
Sent: Thursday, January 10, 2019 3:16 PM
To: HttpComponents Project
Subject: RE: Http CONNECT Method with XFF Header

I found this class, but can't edit because it is .class binary file

public class RequestClientConnControl implements HttpRequestInterceptor {

    private final Log log = LogFactory.getLog(getClass());

    private static final String PROXY_CONN_DIRECTIVE = "Proxy-Connection";

    public RequestClientConnControl() {
        super();
    }

    public void process(final HttpRequest request, final HttpContext context)
            throws HttpException, IOException {
        Args.notNull(request, "HTTP request");

        final String method = request.getRequestLine().getMethod();
        if (method.equalsIgnoreCase("CONNECT")) {
            request.setHeader(PROXY_CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE);
            return;
        }

Omar Khateeb | QA Engineer, IDA & DLP
Check Point Software Technologies | | omark@checkpoint.com


-----Original Message-----
From: Omar Alkhateeb [mailto:omark@checkpoint.com] 
Sent: Thursday, January 10, 2019 3:15 PM
To: HttpComponents Project
Subject: RE: Http CONNECT Method with XFF Header

Hi Oleg,

Thanks for the response, Can you show me example of the steps you guided me, I can't find a way

Omar Khateeb | QA Engineer, IDA & DLP
Check Point Software Technologies | | omark@checkpoint.com

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: Wednesday, January 09, 2019 6:38 PM
To: HttpComponents Project
Subject: Re: Http CONNECT Method with XFF Header

On Wed, 2019-01-09 at 14:54 +0000, Omar Alkhateeb wrote:
> Hi All,
> 
> As I noticed, there is no Class for HttpConnect method
> 
> I need to add specific Http Header on CONNECT which is called X-For-
> Forward
> 
> I can successfully add XFF Header on HttpGet Request using :
> 
> HttpClientContext context = HttpClientContext.create();
> HttpGet httpget = new HttpGet(URL);
> RequestConfig requestConfig =
> RequestConfig.copy(defaultRequestConfig)
>         .setProxy(new HttpHost(Proxy, Port))
>         .build();
> httpget.setConfig(requestConfig);
> httpget.setHeader("X-Forwarded-For", XFFHeader);
> httpget.setHeader(new BasicHeader("Prama", "no-cache"));
> httpget.setHeader(new BasicHeader("Cache-Control", "no-cache"));
> httpget.setHeader("X-Requested-With", "XMLHttpRequest");
> httpget.setHeader(HttpHeaders.USER_AGENT,"Mozilla/5.0 (Windows NT
> 10.0; Win64; x64) "
> + "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100
> Safari/537.36 Chrome/69.0.3497.100 "
> + "Apache-HttpClient/4.5.3 (Java/1.8.0_141)");
> 
> Is there a way to Add the same Header to CONNECT method ?
> 

It will not be pretty with HttpClient 4.5 but it can be done.

1. Subclass HttpClientBuilder

2. override #createMainExec method

https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java#L889 

3. Hijack proxyHttpProcessor

Hope this helps

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Email secured by Check Point
B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�]�][��X��ܚX�P˘\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�]�Z[˘\X�K�ܙ�B�

RE: Http CONNECT Method with XFF Header

Posted by Omar Alkhateeb <om...@checkpoint.com>.
I found this class, but can't edit because it is .class binary file

public class RequestClientConnControl implements HttpRequestInterceptor {

    private final Log log = LogFactory.getLog(getClass());

    private static final String PROXY_CONN_DIRECTIVE = "Proxy-Connection";

    public RequestClientConnControl() {
        super();
    }

    public void process(final HttpRequest request, final HttpContext context)
            throws HttpException, IOException {
        Args.notNull(request, "HTTP request");

        final String method = request.getRequestLine().getMethod();
        if (method.equalsIgnoreCase("CONNECT")) {
            request.setHeader(PROXY_CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE);
            return;
        }

Omar Khateeb | QA Engineer, IDA & DLP
Check Point Software Technologies | | omark@checkpoint.com


-----Original Message-----
From: Omar Alkhateeb [mailto:omark@checkpoint.com] 
Sent: Thursday, January 10, 2019 3:15 PM
To: HttpComponents Project
Subject: RE: Http CONNECT Method with XFF Header

Hi Oleg,

Thanks for the response, Can you show me example of the steps you guided me, I can't find a way

Omar Khateeb | QA Engineer, IDA & DLP
Check Point Software Technologies | | omark@checkpoint.com

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: Wednesday, January 09, 2019 6:38 PM
To: HttpComponents Project
Subject: Re: Http CONNECT Method with XFF Header

On Wed, 2019-01-09 at 14:54 +0000, Omar Alkhateeb wrote:
> Hi All,
> 
> As I noticed, there is no Class for HttpConnect method
> 
> I need to add specific Http Header on CONNECT which is called X-For-
> Forward
> 
> I can successfully add XFF Header on HttpGet Request using :
> 
> HttpClientContext context = HttpClientContext.create();
> HttpGet httpget = new HttpGet(URL);
> RequestConfig requestConfig =
> RequestConfig.copy(defaultRequestConfig)
>         .setProxy(new HttpHost(Proxy, Port))
>         .build();
> httpget.setConfig(requestConfig);
> httpget.setHeader("X-Forwarded-For", XFFHeader);
> httpget.setHeader(new BasicHeader("Prama", "no-cache"));
> httpget.setHeader(new BasicHeader("Cache-Control", "no-cache"));
> httpget.setHeader("X-Requested-With", "XMLHttpRequest");
> httpget.setHeader(HttpHeaders.USER_AGENT,"Mozilla/5.0 (Windows NT
> 10.0; Win64; x64) "
> + "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100
> Safari/537.36 Chrome/69.0.3497.100 "
> + "Apache-HttpClient/4.5.3 (Java/1.8.0_141)");
> 
> Is there a way to Add the same Header to CONNECT method ?
> 

It will not be pretty with HttpClient 4.5 but it can be done.

1. Subclass HttpClientBuilder

2. override #createMainExec method

https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java#L889 

3. Hijack proxyHttpProcessor

Hope this helps

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Email secured by Check Point
B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�]�][��X��ܚX�P˘\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�]�Z[˘\X�K�ܙ�B�

RE: Http CONNECT Method with XFF Header

Posted by Omar Alkhateeb <om...@checkpoint.com>.
Hi Oleg,

Thanks for the response, Can you show me example of the steps you guided me, I can't find a way

Omar Khateeb | QA Engineer, IDA & DLP
Check Point Software Technologies | | omark@checkpoint.com

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: Wednesday, January 09, 2019 6:38 PM
To: HttpComponents Project
Subject: Re: Http CONNECT Method with XFF Header

On Wed, 2019-01-09 at 14:54 +0000, Omar Alkhateeb wrote:
> Hi All,
> 
> As I noticed, there is no Class for HttpConnect method
> 
> I need to add specific Http Header on CONNECT which is called X-For-
> Forward
> 
> I can successfully add XFF Header on HttpGet Request using :
> 
> HttpClientContext context = HttpClientContext.create();
> HttpGet httpget = new HttpGet(URL);
> RequestConfig requestConfig =
> RequestConfig.copy(defaultRequestConfig)
>         .setProxy(new HttpHost(Proxy, Port))
>         .build();
> httpget.setConfig(requestConfig);
> httpget.setHeader("X-Forwarded-For", XFFHeader);
> httpget.setHeader(new BasicHeader("Prama", "no-cache"));
> httpget.setHeader(new BasicHeader("Cache-Control", "no-cache"));
> httpget.setHeader("X-Requested-With", "XMLHttpRequest");
> httpget.setHeader(HttpHeaders.USER_AGENT,"Mozilla/5.0 (Windows NT
> 10.0; Win64; x64) "
> + "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100
> Safari/537.36 Chrome/69.0.3497.100 "
> + "Apache-HttpClient/4.5.3 (Java/1.8.0_141)");
> 
> Is there a way to Add the same Header to CONNECT method ?
> 

It will not be pretty with HttpClient 4.5 but it can be done.

1. Subclass HttpClientBuilder

2. override #createMainExec method

https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java#L889 

3. Hijack proxyHttpProcessor

Hope this helps

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Email secured by Check Point

Re: Http CONNECT Method with XFF Header

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2019-01-09 at 14:54 +0000, Omar Alkhateeb wrote:
> Hi All,
> 
> As I noticed, there is no Class for HttpConnect method
> 
> I need to add specific Http Header on CONNECT which is called X-For-
> Forward
> 
> I can successfully add XFF Header on HttpGet Request using :
> 
> HttpClientContext context = HttpClientContext.create();
> HttpGet httpget = new HttpGet(URL);
> RequestConfig requestConfig =
> RequestConfig.copy(defaultRequestConfig)
>         .setProxy(new HttpHost(Proxy, Port))
>         .build();
> httpget.setConfig(requestConfig);
> httpget.setHeader("X-Forwarded-For", XFFHeader);
> httpget.setHeader(new BasicHeader("Prama", "no-cache"));
> httpget.setHeader(new BasicHeader("Cache-Control", "no-cache"));
> httpget.setHeader("X-Requested-With", "XMLHttpRequest");
> httpget.setHeader(HttpHeaders.USER_AGENT,"Mozilla/5.0 (Windows NT
> 10.0; Win64; x64) "
> + "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100
> Safari/537.36 Chrome/69.0.3497.100 "
> + "Apache-HttpClient/4.5.3 (Java/1.8.0_141)");
> 
> Is there a way to Add the same Header to CONNECT method ?
> 

It will not be pretty with HttpClient 4.5 but it can be done.

1. Subclass HttpClientBuilder

2. override #createMainExec method

https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java#L889 

3. Hijack proxyHttpProcessor

Hope this helps

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org