Re: 5.5 Extending HTTP/2, WS_OVER_HTTP/2 | Re: draft-ietf-httpbis-http2-latest, 8.1.2.1 Request Header Fields | Re: draft-ietf-httpbis-http2-latest, 5.5

Yutaka Hirano <yhirano@google.com> Thu, 17 July 2014 05:57 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 (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E6C6D1A0880 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 16 Jul 2014 22:57:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.03
X-Spam-Level:
X-Spam-Status: No, score=-7.03 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sbyLtCMpFYD0 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 16 Jul 2014 22:57:11 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 810511A090D for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 16 Jul 2014 22:57:11 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1X7eey-0002sE-K3 for ietf-http-wg-dist@listhub.w3.org; Thu, 17 Jul 2014 05:55:16 +0000
Resent-Date: Thu, 17 Jul 2014 05:55:16 +0000
Resent-Message-Id: <E1X7eey-0002sE-K3@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <yhirano@google.com>) id 1X7eel-0002KJ-IH for ietf-http-wg@listhub.w3.org; Thu, 17 Jul 2014 05:55:03 +0000
Received: from mail-qc0-f171.google.com ([209.85.216.171]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <yhirano@google.com>) id 1X7eek-0000sK-25 for ietf-http-wg@w3.org; Thu, 17 Jul 2014 05:55:03 +0000
Received: by mail-qc0-f171.google.com with SMTP id i17so1697707qcy.2 for <ietf-http-wg@w3.org>; Wed, 16 Jul 2014 22:54:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IWaZHzH+gXfpmEvw/ga0ILFhrsCNJy0QbY8rGWGJcmw=; b=ANIARBq+4Lc/B71NRFdNywnoiREEK4bu1AYrudBrJgQ0udHvaUiNNWfu2kn0ZqyExi CXxhMZqAKYd89GwJ1fd0/pKnWkscGFHzkvqLjE6iRu3Up+IA/2vnBhY86OPKPhmbcfG0 Sv3WtW5/dfrH09CcQEpFtIePKqhYNqed1qsWTqMCfFioJbdNsF0IpIY9BCRDqGsnCKb5 /lgeHnlLjF7MhxgqmQtSTY+2A7AoKdcJ79BlgKx7m5m6J/Vp/90qsDWneVrpTlhblrP9 EUCYjJDxMdifwtVcptXwFd0gy7+Zm+Z2m/nSpTy0IgAqLpLDEVBQO6YfUBvahm2KQVsV DifA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=IWaZHzH+gXfpmEvw/ga0ILFhrsCNJy0QbY8rGWGJcmw=; b=gBfID6IJJWKQpvEB/vejWgRxf3eG/evsje3CcsM8IZy4IwjpQoHllt0CgkKDOv9FrP JgwdnRk5Z2xIG3QJ+M/3NIPaeU/S8/vW4hH8ZpngdxE/c2izdkqPJObcRJYW+G0fm9QE ii+bzN2vmKCGH0kWc7zeLTSVtm8RLV0pwjNpAqRu8Dg9fj0NN8h93jMv4IxRBwZHD2K9 Xm2TvRHjcoSCnU8Q6De8zpHxccwrNds9gwNOb0f6hGymZ4Po1czCvxq5KnOMHIkfmiLD BXUvfyRK1c/ujq1MzoQDEO1p5E3QIfkuyZ4pv3PFIYOtasGbUOdrz8FZDMYsCg77PgwY 6fKA==
X-Gm-Message-State: ALoCoQkuY5k5Coacu8P2QWZSupArULC0TM+vQs5K9dcVuAmlxCtq3UPf6ct4gLSbemJtIiuYLzMR
MIME-Version: 1.0
X-Received: by 10.140.30.73 with SMTP id c67mr51597769qgc.16.1405576475832; Wed, 16 Jul 2014 22:54:35 -0700 (PDT)
Received: by 10.140.44.34 with HTTP; Wed, 16 Jul 2014 22:54:35 -0700 (PDT)
In-Reply-To: <201407170537.s6H5bOB8002082@shell.siilo.fmi.fi>
References: <20140711154501.871745BC004@smtp5.welho.com> <CABkgnnXS4BVYMq43pKczzmRfNeLEaCNt6rprsX6eecU2whvhzA@mail.gmail.com> <CABihn6HpJPwKMjhtSkhZNM6CFsaQxrfmj286H65j8p0jWTAkRw@mail.gmail.com> <201407140442.s6E4gJbN028792@shell.siilo.fmi.fi> <201407142009.s6EK9OBE024561@shell.siilo.fmi.fi> <CABkgnnX3R8Vx8o9yHN=J6FsQZEGEUcJxA-Nv_iUOXX8b0Q47OA@mail.gmail.com> <201407150552.s6F5qBtY010352@shell.siilo.fmi.fi> <CABkgnnWg39_d6xj8vyX1q4TP3-J+uxYyjScK8h+V_=wDBnbGAg@mail.gmail.com> <201407160600.s6G60DCQ022972@shell.siilo.fmi.fi> <201407160633.s6G6XxMa024007@shell.siilo.fmi.fi> <CABkgnnXFW05Kp_nh45bxQ9cqG05J-C_oeRJkwO4iiEsoGiZxpg@mail.gmail.com> <CABihn6Hn-drA823xq3XKrkeDpisR97mKqD6vcXrLAvpUXMsMAA@mail.gmail.com> <201407170537.s6H5bOB8002082@shell.siilo.fmi.fi>
Date: Thu, 17 Jul 2014 14:54:35 +0900
Message-ID: <CABihn6HMesH7Cp1k+GsxSk-S6nZ-tZ7Xb_P5qBiqY8ESj=5dkA@mail.gmail.com>
From: Yutaka Hirano <yhirano@google.com>
To: Kari Hurtta <hurtta-ietf@elmme-mailer.org>
Cc: Martin Thomson <martin.thomson@gmail.com>, HTTPBIS working group mailing list <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="001a113a35a48c209904fe5d464e"
Received-SPF: pass client-ip=209.85.216.171; envelope-from=yhirano@google.com; helo=mail-qc0-f171.google.com
X-W3C-Hub-Spam-Status: No, score=-3.3
X-W3C-Hub-Spam-Report: AWL=-2.498, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1X7eek-0000sK-25 d85b35bdc88e2394e4fb47e8c713e5dc
X-Original-To: ietf-http-wg@w3.org
Subject: Re: 5.5 Extending HTTP/2, WS_OVER_HTTP/2 | Re: draft-ietf-httpbis-http2-latest, 8.1.2.1 Request Header Fields | Re: draft-ietf-httpbis-http2-latest, 5.5
Archived-At: <http://www.w3.org/mid/CABihn6HMesH7Cp1k+GsxSk-S6nZ-tZ7Xb_P5qBiqY8ESj=5dkA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/26013
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>

Thank you for the feedback!
I am updating my WebSocket over HTTP/2 draft to reflect recent changes to
the HTTP/2 spec and any comments are welcome.

So I guess that Websocket handshake response is a HEADERS frame.
> Because new colon-headers was not allowed in extensions, I guess that
> this handshake is regular HTTP-header.
> ( And I suppose that Websocket handshake request must be HEADERS frame
>   because that is used to open new stream on HTTP/2. [*] )

Yes, handshake request and response use usual HEADERS frames.
The server knows that the client wants to establish a WebSocket connection
from
:scheme header (which is a standard colon header).
We can define usual headers for handshake without violating the HTTP/2 spec,
like sec-websocket-protocol in the native WebSocket.

But it is needed to confirm that intermediaries understand WebSocket over
HTTP/2.
That's why SETTINGS frames with WS_CAPABLE is needed.

Does that make sense?



On Thu, Jul 17, 2014 at 2:37 PM, Kari Hurtta <hurtta-ietf@elmme-mailer.org>
wrote:

> [ Date: Thu, 17 Jul 2014 10:38:36 +0900
>   From: Yutaka Hirano <yhirano@google.com>
>   To: Martin Thomson <martin.thomson@gmail.com>
>   cc: Kari Hurtta <hurtta-ietf@elmme-mailer.org>,
>                 HTTPBIS working group mailing list <ietf-http-wg@w3.org>
> ]
>
> Yutaka Hirano <yhirano@google.com>: (Thu Jul 17 04:38:36 2014)
> > I see.
> > Currently I would like to use SETTINGS frames to confirm the
> WS-over-HTTP/2
> > capability of a communication channel, like this.
> >
> > An endpoint sends a SETTINGS frame with WS_CAPABLE once a HTTP/2
> connection
> > is created.
> > An endpoint knows that an HTTP/2 connection is capable of WS_OVER_HTTP/2
> if
> > it receives a SETTINGS frame with WS_CAPABLE.
> > A client knows that an HTTP/2 connection isn't capable of WS_OVER_HTTP/2
> if
> > it receives a Websocket handshake response before receiving a SETTINGS
> > frame with WS_CAPABLE.
>
> So I guess that Websocket handshake response is a HEADERS frame.
> Because new colon-headers was not allowed in extensions, I guess that
> this handshake is regular HTTP-header.
>
> ( And I suppose that Websocket handshake request must be HEADERS frame
>   because that is used to open new stream on HTTP/2. [*] )
>
> > A server knows that an HTTP/2 connection isn't capable of WS_OVER_HTTP/2
> if
> > it receives a Websocket handshake request before receiving a SETTINGS
> frame
> > with WS_CAPABLE.
> >
>
> If handshake response is some new frame type, then already receipt of a new
> frame type guarantees that endpoint (and whole chain of intermediaries and
> server)
> are capable of WS_OVER_HTTP/2.
>
> As per
>
> 5.5 Extending HTTP/2
> http://http2.github.io/http2-spec/#extensibility
>
> intermediaries does not "forward" unknown frame types (and of course does
> not
> send SETTINGS frame with unknown settings to upstream).
>
> ( Also if hanshake was reserved bits, then already presence of these
>   guarantee that endpoint are capable of WS_OVER_HTTP/2. But there
>   is not many usefull reserved bits on
>
>   4.1 Frame Format
>   http://http2.github.io/http2-spec/#FrameHeader
>
>   and not any on
>
>   6.2 HEADERS
>   http://http2.github.io/http2-spec/#HEADERS
>
>   I do not see that
>
>   5.5 Extending HTTP/2
>   http://http2.github.io/http2-spec/#extensibility
>
>   allows extending flags for existing frame types,
>   but I do not see that explicitly forbidden either. )
>
> [*] If Websocket hanshake and new stream is opened with new frame type,
>     that is not possible before both endpoints are received SETTINGS
>     frame wich imply WS_OVER_HTTP/2.
>
>
> > Martin, does that look correct to you?
>
> This was not to me (but as "cc:"), but seems that I commented anyway ☺
>
> > Thanks,
>
> / Kari Hurtta
>
>
> > On Thu, Jul 17, 2014 at 2:08 AM, Martin Thomson <
> martin.thomson@gmail.com>
> > wrote:
> >
> > > On 15 July 2014 23:33, Kari Hurtta <hurtta-ietf@elmme-mailer.org>
> wrote:
> > > > Should this
> > > >         "other than those defined in this document"
> > > >
> > > > to be
> > > >         "other than those defined in this document or extensions
> > > (Section 5.5)"
> > >
> > > We decided to forbid the use of colon-headers in extensions.
> > >
> > > > In other hand I think that this whole text
> > > >
> > > > » Header field names that start with a colon are only valid in the
> > > HTTP/2 context. These are not
> > > > » HTTP header fields. Endpoints MUST NOT generate header fields that
> > > start with a colon other
> > > > » than those defined in this document [or extensions (Section 5.5)]
> > > >
> > > > belong to
> > > >
> > > > 8.1.2 HTTP Header Fields
> > >
> > > Let's see:
> > >
> https://github.com/http2/http2-spec/commit/cf1677cbc2b8f501204de18ecfe6ff4be623b9ba
> > >
>
>
>