Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 50815 invoked from network); 10 Jan 2002 21:28:06 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 10 Jan 2002 21:28:06 -0000 Received: (qmail 20023 invoked by uid 97); 10 Jan 2002 21:28:10 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 19975 invoked by uid 97); 10 Jan 2002 21:28:09 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 19964 invoked from network); 10 Jan 2002 21:28:09 -0000 Message-ID: <921E60ADEB30D84EACA350AD31A1FD75113523@chiex02> From: "Sale, Doug" To: 'Jakarta Commons Developers List' Subject: RE: HTTPClient - setting default request headers impl Q Date: Thu, 10 Jan 2002 15:28:07 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C19A1D.B24A2FE0" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C19A1D.B24A2FE0 Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: otisg@ivillage.com [mailto:otisg@ivillage.com] > Sent: Wednesday, January 09, 2002 10:35 PM > To: commons-dev@jakarta.apache.org > Subject: Re: HTTPClient - setting default request headers impl Q > > > 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? > I think User-Agent headers should be allowed. The default should be some HttpClient identifier. But users should be able to set their own (overriding) User-Agent header. This would be useful for testing URL's that take different actions based on User-Agent. -Doug > 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: > > For additional commands, e-mail: > > ------_=_NextPart_001_01C19A1D.B24A2FE0--