Re: Sent request with no User-Agent header

2018-11-28 Thread glin...@live.com
As per  HttpClient JavaDoc

  


> This class sets up the following parameters 
*
> if not explicitly set
*
> :
> 
> Version: HttpVersion.HTTP_1_1
> ContentCharset: HTTP.DEFAULT_CONTENT_CHARSET
> NoTcpDelay: true
> SocketBufferSize: 8192
*
> UserAgent: Apache-HttpClient/release (java 1.5)
*

I don't think there is an easy way of disabling this (unless you would like
to go for  Reflection
 
)

If you don't want the User-Agent header you can switch to "Java"
implementation, the setting lives under "Advanced" tab of the HTTP Request
sampler (or even better  HTTP Request Defaults

 
, this way the setting will be applied to all the HTTP Request samplers in
its scope and you will not have to revisit each one individually)  

Also be aware that according to JMeter Best Practices  you should always be
using the latest version of JMeter
  
so consider upgrading to JMeter 5.0 (or whatever is available at  JMeter
Downloads    page) on next
available opportunity




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Sent request with no User-Agent header

2018-11-28 Thread Antony Bowesman
Using JMeter 3.3

How can I send an http request without a User-Agent header.

I have a HeaderManager for the request, but if I don't specify as UA header, it 
sends something like

User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_102)

whereas if I specify User-Agent as an empty value, it will send an empty UA 
header.

It seems like HttpProtocolParams will add the http.useragent default property, 
so will effectively mandate the UA header.

Antony