Hi,

I spent some time debugging and I actually found that the problem is that the 
proxy is not configured properly and because of this the request never gets 
through it.

We are using the RequestConfig#setProxy to set it (which is deprecated it 
seems) and after this we set the Request config to the context like -  
exec.getCntx().setAttribute(HttpClientContext.REQUEST_CONFIG, reqConfig); which 
again seems is deprecated.

Later we have a custom HttpRoutePlanner which in the HTTP case falls back to 
the SystemDefaultRoutePlanner where I see that we try to get the proxy from the 
config but this proxy is null.

So what should the appropriate way to config the proxy now? Should I directly 
use the HTTPClientContext setter to set the request config? We currently use 
the HTTPContext interface which doesn't have the setters and getters, only the 
attribute ones, so should we change this to use the HTTPClientContext? Is this 
the only implementation that is going to be used in the future?

Best Regards,
Yavor 

P.S. It is not possible for me to provide any unit tests or a way to reproduce 
this, but I'll try to be more descriptive in the future.



-----Original Message-----
From: Gary Gregory <[email protected]> 
Sent: Monday, September 1, 2025 7:54 PM
To: HttpClient User Discussion <[email protected]>
Subject: Re: Via and Vary headers are missing from the received response after 
update from HTTP Client 5.3.1 to 5.5

I think a failing unit test, or some kind of a reproducer, will help move 
things along.

Gary

On Mon, Sep 1, 2025, 07:29 Stankov. Yavor <[email protected]> wrote:

> Hi,
>
> We just saw that after we updated to the latest Apache HTTP Client 
> version, our tests started failing because the Via and Vary headers 
> are missing from the response of the test cases where a proxy is used 
> in between the client and the server. There is nothing changed on the 
> proxy side nor on the server side. The tests are still passing if we 
> use an older version of the Apache HTTP Client.
>
> Do you have any idea what might be causing this.
>
> I just saw this entry in the release notes but I'm not sure what this 
> optimization is about -> HTTPCLIENT-2293: Via header protocol 
> improvements and performance optimization.
>
> Best Regards,
> Yavor
>

Reply via email to