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)
|
public void setUserAgentField(HttpField agent)
|
||||||
{
|
{
|
||||||
if (agent.getHeader() != HttpHeader.USER_AGENT)
|
if (agent != null && agent.getHeader() != HttpHeader.USER_AGENT)
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
this.agentField = agent;
|
this.agentField = agent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue