Re: HTTP/2.0 Magic

Mark Nottingham <mnot@mnot.net> Tue, 19 February 2013 06:25 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BE05F21F8D6D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 18 Feb 2013 22:25:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.452
X-Spam-Level:
X-Spam-Status: No, score=-9.452 tagged_above=-999 required=5 tests=[AWL=1.147, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2zARL6xEG7Db for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 18 Feb 2013 22:25:18 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 8506A21F8D69 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 18 Feb 2013 22:25:18 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1U7gd4-0006c7-It for ietf-http-wg-dist@listhub.w3.org; Tue, 19 Feb 2013 06:24:38 +0000
Resent-Date: Tue, 19 Feb 2013 06:24:38 +0000
Resent-Message-Id: <E1U7gd4-0006c7-It@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1U7gcw-0006b6-6F for ietf-http-wg@listhub.w3.org; Tue, 19 Feb 2013 06:24:30 +0000
Received: from mxout-08.mxes.net ([216.86.168.183]) by maggie.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1U7gcv-0007Mv-8R for ietf-http-wg@w3.org; Tue, 19 Feb 2013 06:24:30 +0000
Received: from [192.168.1.80] (unknown [118.209.197.138]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id D1259509B8; Tue, 19 Feb 2013 01:24:05 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <20130219062100.GA26186@1wt.eu>
Date: Tue, 19 Feb 2013 17:24:02 +1100
Cc: "Roy T. Fielding" <fielding@gbiv.com>, Martin Thomson <martin.thomson@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <5C517A54-2C3D-40C3-8C87-C1A362F6CC70@mnot.net>
References: <CABkgnnV1AqvPk3513rReH-rktYuxf9zDTHpQT9agfZgKrqF_aw@mail.gmail.com> <8F582448-A298-4BC0-A843-ACA4354AB109@gbiv.com> <641194C3-9EF5-4B67-BFB6-6605983ED6A0@mnot.net> <20130219062100.GA26186@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1499)
Received-SPF: pass client-ip=216.86.168.183; envelope-from=mnot@mnot.net; helo=mxout-08.mxes.net
X-W3C-Hub-Spam-Status: No, score=-3.3
X-W3C-Hub-Spam-Report: AWL=-3.287, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1U7gcv-0007Mv-8R 871a9767b0f6b2c57fd02b69858befa3
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HTTP/2.0 Magic
Archived-At: <http://www.w3.org/mid/5C517A54-2C3D-40C3-8C87-C1A362F6CC70@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16679
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 19/02/2013, at 5:21 PM, Willy Tarreau <w@1wt.eu> wrote:

> On Tue, Feb 19, 2013 at 04:21:01PM +1100, Mark Nottingham wrote:
>> [ Now: https://github.com/http2/http2-spec/issues/25 ]
>> 
>> On 01/02/2013, at 6:17 PM, Roy T. Fielding <fielding@gbiv.com> wrote:
>> 
>>> 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
>> 
>> I like the general approach. A few questions:
>> 
>> * Should it end with CRLFCRLF? Seems to me this _might_ fast fail on a few
>> more implementations.
> 
> Indeed it should. For example I have an old crappy test server which waits
> for the empty line whatever the request line looks like. Similarly, mini_httpd
> did this (and I've seen it used in several embedded devices).
> 
> However, I remember that when the same approach was proposed on hybi, one
> of the concerns that was raised was that some servers will happily return
> a valid response and may corrupt intermediary caches. I remember that about
> all intermediary implementations authors explained that no cache will ignore
> the method in the request, but still that was a concern that plagued the
> design.

I'm not convinced it's a concern.


>> * Is the magic identifying the underlying framing layer in use (what we're
>> now calling HTTP/2, but I suspect we might want to start calling it something
>> else), the profile in use over it, or both? My sense is that both is perhaps
>> best.
> 
> I personally don't understand what it's about :-/
> 
>> * Is the magic sent by a client upon connect, by a server upon connect, or both?
> 
> We should absolutely not have a "banner protocol".

Definitely not; question is whether the server prepends something to the start of the framing layer.


> So the client must speak first. If we decide that it's desirable that
> the server responds, we must use a different pattern to avoid false
> positives on echo servers or those which would return a message such
> as "FOO CRLF unknown method".


Yes.

Cheers,


--
Mark Nottingham   http://www.mnot.net/