If the User-Agent header is null the default value is used (take a look at HttpMethodBase.addUserAgentRequestHeader()). This value is loaded from the system property "httpclient.useragent" and defaults to "Jakarta Commons-HttpClient/2.0alpha3". To change this value you should either set the "httpclient.useragent" system property or set the User-Agent header to something other than null.

Mike

On Tuesday, March 11, 2003, at 07:03 PM, Jesus M. Salvo Jr. wrote:


When I call:


HttpMethod.removeRequestHeader( "User-Agent" ) ;

... the header is not removed and the value is "Jakarta-Commons-HttpClient ..." based on the packet capture that I have done.
If I call:


HttpMethod.setRequestHeader( "User-Agent", null ) ;

... the header is there without any value.
If I call:

   HttpMethod.setRequestHeader( "User-Agent", null ) ;
   HttpMethod.removeRequestHeader( "User-Agent" ) ;

... the User-Agent header is again not removed and the value is "Jakarta-Commons-Httpclient .. .blah"




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to