----- Original Message -----
From: "Patrick Luby" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
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:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
> --
> ________________________________________________________________
> Patrick Luby                     Email: [EMAIL PROTECTED]
> Sun Microsystems                         Phone: 408-276-7471
> 901 San Antonio Road, USCA14-303
> Palo Alto, CA 94303-4900
> ________________________________________________________________
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to