Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 81764 invoked from network); 17 Aug 2002 03:00:09 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 17 Aug 2002 03:00:09 -0000 Received: (qmail 16518 invoked by uid 97); 17 Aug 2002 03:00:36 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 16492 invoked by uid 97); 17 Aug 2002 03:00:36 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 16480 invoked by uid 98); 17 Aug 2002 03:00:35 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <000d01c2459b$035143a0$5bc22e04@dslverizon.net> From: "Bill Barker" To: "Tomcat Developers List" References: <200208162135.27666.steve.downey@netfolio.com> <3D5DAA5E.1060207@sun.com> Subject: Re: Watchdog aggregation of headers may be incorrect Date: Fri, 16 Aug 2002 20:05:58 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archived: msg.XXnGuaLa@sneezy X-Scanned-By: MIMEDefang 2.11 (www dot roaringpenguin dot com slash mimedefang) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ----- Original Message ----- From: "Patrick Luby" To: "Tomcat Developers List" Sent: Friday, August 16, 2002 6:43 PM Subject: Re: Watchdog aggregation of headers may be incorrect > Steve, > > Your assessment is correct: an aggregate header like: > > header1: val1, val2 > > should be converted to this for the HttpRequest: > > header1: val1 > header1: val2 > > Tomcat 4 used to do this conversion correctly but then it stopped doing > the conversion a few months ago. > > This should be fixed as it is Servlet spec non-compliance. However, I am > not sure where the parsing of headers is now performed in Tomcat? > > Can anyone point Steve to where this header parsing of the ServerSocket > input stream is being done? For stand-alone, it is: j-t-c/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.parseHead er It's a bit more complicated for Apache/IIS/iPlanet. > > Patrick > > Steve Downey wrote: > > Watchdog now merges headers, by design. ie (from the checking message) > > Modified logic to send duplicate headers as one aggregated header vs. two > > headers: > > > > header1: val1 > > header1: val2 > > > > -will now be- > > > > header1: val1, val2 > > > > Due to this, it looks like a couple of tests are failing. GetHeadersTest and > > HttpServletRequestWrapperGetHeadersTest. > > > > GetHeadersTest looks for two Accept-Language headers, en-us and ga-us. It does > > work if they are sent as > > Accept-Language:en-us > > Accept-Language:ga-us > > > > But, being sent as: > > Accept-Language:en-us, ga-us > > > > it is presented to the servlet as ONE header, with the value "en-us, ga-us" > > > > However, I'm not sure that it shouldn't be. Parsing a multivalued header is > > not only diffcult, it seems to depend on which header is being parsed. > > Certainly full interpretation is very dependent on the header, e.g. > > Accept-Language: da, en-gb;q=0.8, en;q=0.7 > > Date: Wed, 15 Nov 1995 06:25:24 GMT > > > > The first has three values, the second has one. Interpretation depends on the > > name of the header. I don't believe the Request.getHeaders() mechanism should > > try and interpret the values after the :. > > > > > > > > > > -- > > To unsubscribe, e-mail: > > For additional commands, e-mail: > > -- > ________________________________________________________________ > Patrick Luby Email: patrick.luby@sun.com > Sun Microsystems Phone: 408-276-7471 > 901 San Antonio Road, USCA14-303 > Palo Alto, CA 94303-4900 > ________________________________________________________________ > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: