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 12:38:46 GMT
The text string parsing is really not fun.  One day we should go to regex
pattern matching, which is not to difficult to construct from the BNF in the
relevent RFCs.  It will also be easier to handle non-standard/malformatted
responses.

Perhaps that will be HttpClient 3.0 ...


Ortwin Gl├╝ck wrote:

> LWS            = [CRLF] 1*( SP | HT )
>
> Damn. We must parse this shit....
>
> Ryan Hoegg wrote:
>
> > I have never seen a server do this, but you are right about the
> > quoted-string:
> >
> >     quoted-string  = ( <"> *(qdtext | quoted-pair ) <"> )
> >     quoted-pair    = "\" CHAR
> >     qdtext         = <any TEXT except <">>
> >
> >     TEXT           = <any OCTET except CTLs,
> >                        but including LWS>
> >
> > So it seems that for each cunk-ext-val, we need to:
> > 1) read the first char
> > 2) if it is not a <">, proceed as we currently do
> > 3) if it is, continue to read chars until a <"> or a <\> is reached
> > 4) in the case of a <\>, skip the next character
> > 5) in the case of a <">, ensure that we either have CRLF or <;>
> > 6) if we have <;>, we read another <token=token|quoted-string> i.e.
goto 1
> >
> > This is my reading of RFC2616.
>
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


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