commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Can't set User-Agent header
Date Mon, 07 Jan 2002 18:01:07 GMT

I agree with you.  My solution was too much of a hack.  I hate hacks, so I wasn't very happy
with my solution either.
Something like setDefaultRequestHeader(String name, String value) would be a good addition

Who has commit access and can do this?
I can send a patch later...


On Sun, 06 January 2002, "Paul C. Bryan" wrote:

> wrote:
>  > I like recycle(), and it makes sense that some request headers are
>  > reset (e.g. Host header), but it makes less sense to erase some
>  > request headers that are likely to remain the same in subsequent URL
>  > retrievals, such as the User-Agent header.
>  >
> > So how about this change to recycle() method in HttpMethodBase:
>  >
>  > [Example of retaining user-agent request header on recycle call].
> I am opposed to keeping certain request headers around on recycle calls. 
> I believe a call to recycle should result in a known, repeatable and 
> easy-to-document state, similar if not identical to that of creating a 
> new method instance.
> Trying to decide on what constitutes "headers that are likely to remain 
> the same in subsequent URL retrievals" is problematic, because this 
> differs greatly from one application to the next. For example, if 
> HttpClient is used in a proxy server, "User-Agent" would be that of the 
> requesting client, and will differ on every single call.
> I might be supportive of the ability to set default values whenever 
> methods are created or recycled. For instance, something like a 
> "setDefaultUserAgent" method. This is easier to use, document and test, 
> Yours truly,
> Paul C. Bryan <>
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

_________________________________________________________________ Solutions for Your Life 
Check out the most exciting women's community on the Web

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message