Hi Greg
> I'm trying to write a proxy that passes the caller's HTTP user agent
> through to the target endpoint. Currently, the user agent is being
> removed from the incoming request and replaced with the Synapse user
> agent. Is it possible to prevent this behavior or explicitly set the
> user agent for the outgoing request? From what I can tell, the
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender#invoke method calls
> removeUnwantedHeaders before it processes the outgoing request. This is
> the method that explicitly removes the user agent.
>   
Hmm.. I think its right to replace the user agent, since to the backend
service that receives a request from Synapse, the user agent "is"
Synapse..  Do you think this is wrong?

However, if you set a custom user agent header as a Synapse transport
header during mediation, thats applied after the above method call and
it "may" work.. I cannot tell you for sure until you try it out, since
we do however hard code the user agent via a request handler. Best is to
give that a try as a workaround.. however I am free to consider
retaining the user agent header if there is a compelling reason - but so
far this is the first time I've heard this request from a user

cheers
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com




Reply via email to