commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: HTTPClient - setting default request headers impl Q
Date Tue, 08 Jan 2002 17:49:34 GMT


On 8 Jan 2002 otisg@ivillage.com wrote:

> Date: 8 Jan 2002 07:41:12 -0800
> From: otisg@ivillage.com
> Reply-To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
> To: commons-dev@jakarta.apache.org, commons-dev@jakarta.apache.org
> Subject: HTTPClient - setting default request headers impl Q
>
> 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.

> Thanks,
> Otis
>

Craig McClanahan


--
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