commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Dever <jsde...@sympatico.ca>
Subject Re: [PATCH][HttpClient] bug 12607
Date Thu, 26 Sep 2002 11:49:23 GMT
Also from RFC2616:
       TEXT           = <any OCTET except CTLs,
                        but including LWS>

       CTL            = <any US-ASCII control character
                        (octets 0 - 31) and DEL (127)>

       quoted-string  = ( <"> *(qdtext | quoted-pair ) <"> )
       qdtext         = <any TEXT except <">>
       quoted-pair    = "\" CHAR

So \n and \r are in the range of CTL and are therefore not valid in the
chunk-extension.

Ortwin Gl├╝ck wrote:

> Ryan Hoegg wrote:
> > chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
> > chunk-ext-name = token
> > chunk-ext-val  = token | quoted-string
> > token          = 1*<any CHAR except CTLs or separators>
> >
> > Since chunk-extension includes only tokens and an "=" I read this to say
> > that neither \r or \n is allowed before the first CRLF in a chunk.
>
> But the quoted string may contain virtually ANY character, no?
>
> Legal:
> 89ab;value\r\n
> 89ab;key=value\r\n
> 89ab;key=\"value\"\r\n
> 89ab;key=\"line1\r\nline2\rline3\nline4\"\r\n
>
> Illegal:
> 89ab;key=line1\rline2\r\n
> 89ab;key=line1\r\nline2\r\n
>
> Since we ignore everything after the ; anyway, I don't want to parse
> this, really. But we run into serious problems in the case where a \r\n
> occurs within the quoted string!
> I have never encountered a server using this in the real-world (but I
> haven't seen enough servers). So once again: Has anybody ever see a
> server using this?


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