You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/05/06 21:34:31 UTC

[Bug 54703] Nullpointer exception in HttpParser.parseMediaType

https://issues.apache.org/bugzilla/show_bug.cgi?id=54703

Jarek Gawor <jg...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #4 from Jarek Gawor <jg...@gmail.com> ---
Mark,

We ran into the same problem while upgrading Geronimo (while running TCK). It
would be great if you can reconsider fixing this for the following reasons:

1) This can be considered as a regression. A header value with LWS was accepted
fine in Tomcat 7.0.27, for example. This, of course, makes things harded for
the users as now they might be forced to change their code to work on the
latest version of Tomcat.

2) The Servlet 3.0 spec does not talk about (one way or the other) how the
header value should look like when using addHeader()/setHeader() API.

3) The HTTP/1.1 spec in section 2.1 talks about "implied *LWS":

      "The grammar described by this specification is word-based. Except
      where noted otherwise, linear white space (LWS) can be included
      between any two adjacent words (token or quoted-string), and
      between adjacent words and separators, without changing the
      interpretation of a field."

So that would allow LWS within almost any header value - or at least
addHeader()/setHeader() should be able to deal with it.

4) The HTTP/1.1 spec in section 2.2 talks about replacing LWS with a single SP
before interpreting values. I think that mostly talks about the folding LWS (on
the wire format) but since Tomcat is interpreting the values it maybe should
follow the same logic in addHeader()/setHeader() API.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org