Hi jetty-users, I am writing a HTTP proxy that calls remote services by jetty-client. I do not want the proxy to modify user agent headers, it should be whatever the incoming request says (we do UA-detection on the far side).
HttpRequest does something reasonable:
HttpField userAgentField = client.getUserAgentField();
if (userAgentField != null)
headers.put(userAgentField);
but HttpClient says no:
public void setUserAgentField(HttpField agent)
{
if (agent.getHeader() != HttpHeader.USER_AGENT)
throw new IllegalArgumentException();
this.agentField = agent;
}
throws NPE.
What's the right way to have the client not muck with UA? Should we
relax the setter to allow setUserAgentField(null)? I can subclass
but that's a little obnoxious just for this...
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
