[ 
https://issues.apache.org/jira/browse/CXF-6611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15415644#comment-15415644
 ] 

Vijendra Kulhade commented on CXF-6611:
---------------------------------------

Is there any other way to tackle this problem without touching the system 
property.
SOAP UI able to modify the headers and it uses User-Agent: 
Apache-HttpClient/4.1.1.
CXF client uses  User-Agent: Java/1.8.0_101. If CXF will use the same user 
agent, I guess this system property won't be required. 

> Unable to override Host in HTTP Header
> --------------------------------------
>
>                 Key: CXF-6611
>                 URL: https://issues.apache.org/jira/browse/CXF-6611
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.7.7
>            Reporter: Damon Horrell
>
> Setting http-conf:client Host="xxx" doesn't work.
> According to the following link this should set the HTTP Host header:
> http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-Theclientelement
> I've stepped through the code in Headers.setFromClientPolicy and it is using 
> this to create the headers.  The outbound logging interceptor also shows this 
> header set on the message.
> However when the request arrives at the server, the Host header is set to the 
> actual address not the value that I specified.  I have verified this with a 
> servlet filter and also with a debugging web proxy.
> So at some point after the logging, the Host header is being lost.  Other 
> headers (also set via http-conf:client) do get sent correctly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to