mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 20:39:18 +00:00
Fixes #1845 - Allow null User-Agent in HttpClient.
This commit is contained in:
parent
b7bd1b25aa
commit
6aafc3b792
@ -729,7 +729,7 @@ public class HttpClient extends ContainerLifeCycle
|
||||
*/
|
||||
public void setUserAgentField(HttpField agent)
|
||||
{
|
||||
if (agent.getHeader() != HttpHeader.USER_AGENT)
|
||||
if (agent != null && agent.getHeader() != HttpHeader.USER_AGENT)
|
||||
throw new IllegalArgumentException();
|
||||
this.agentField = agent;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user