hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Host header overridden from HTTPCore 4.1
Date Wed, 13 Jun 2012 08:18:09 GMT
On Tue, 2012-06-12 at 11:41 +0530, Kasun Indrasiri wrote:
> Hi all,
> 
> We are using httpcore 4.1, in Apache Synapse and we have a requirement
> where the original 'Host' header received from client should be preserved
> till the message goes to the backend server.
> And I have debugged inside, RequestTargetHost:process method and I can
> observe that the correct 'host' header that comes from the client side and
> the debug flow doesn't go inside "if
> (!request.containsHeader(HTTP.TARGET_HOST)) {" as we already have the host
> header.
> 
> However, when message goes out from httpcore level, the host header is set
> to the actual backend service address(eg: "Host: 127.0.0.1:6060").
> 
> Any thoughts on how we can fix this?
> 
> Thanks,
> Kasun.

Kasun

To my best knowledge RequestTargetHost is the only class in HttpCore
that can modify the Host header in HTTP requests. I do not think
HttpCore is at fault here. 

Oleg



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


Mime
View raw message