commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ot...@ivillage.com
Subject Re: HTTPClient - setting default request headers impl Q
Date Thu, 10 Jan 2002 04:34:47 GMT
On Tue, 08 January 2002, "Craig R. McClanahan" wrote:

> On 8 Jan 2002 otisg@ivillage.com wrote:
> 
> > Date: 8 Jan 2002 07:41:12 -0800
> > From: otisg@ivillage.com
> >
> > What should happen if one calls setRequestHeader("foo", "bar"), and
> > "foo" is already set to some value as the default header, and also, what
> > should happen if things are the other way around?
> >
> > I think that setting a default header should take precedence, no?
> >
> 
> In the servlet API, calling response.setHeader("foo", "bar") replaces any
> previous "foo" values, while calling response.addHeader("foo", "bar") adds
> an additional value.  You might want to think about using that convention.

Yes, I thought about it and I just checked the Servlet API.
But what if one tries this with HTTP Client:
meth.setRequestHeader("User-Agent", "FOO");
and
meth.setRequestHeader("User-Agent", "BAR");

What should be the final User-Agent request header?
There can't/shouldn't be User-Agent headers, right?

Thanks,
Otis

_________________________________________________________________
iVillage.com: Solutions for Your Life 
Check out the most exciting women's community on the Web   
http://www.ivillage.com

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message