Re: HTTP/2.0 Magic

On Thu, 31 Jan 2013, James M Snell wrote:

> On Thu, Jan 31, 2013 at 11:17 PM, Roy T. Fielding <fielding@gbiv.com> wrote:
> 
> > [snip]
> >
> > Umm, sending high bit characters is far more likely to be ignored
> > or trigger parsing bugs than simple ascii.
> >
> > The best way to a quick and safe end (actually tested in
> > practice 10 years ago) is to send something that looks like a method
> > and ends with CRLF.  Hence, waka sends a 64bit value
> >
> >    wakaVV<CRLF>
> >
> > where the first V is the version being sent and the second V is the
> > highest version accepted.  Both are a variant of base64 that starts
> > at 0, so the beginning of each message is
> >
> >   77 61 6b 61 30 30 0d 0a
> >
> >
> +1 ... sending a simple "HTTP20<CRLF>" seems it would be sufficiently
> effective. The 20 is the major and minor version. The preamble for http/2.1
> would be "HTTP21<CRLF>"

It seems to me that including CRLF is more likely to result in the string
being ignored then if it is an unterminated sequence which would get
catenated with the payload by a parser which didn't know about it.

Dave Morris

Received on Friday, 1 February 2013 07:46:55 UTC