HTTP 2.0 "Upgrade" flow

Ilya Grigorik <ilya@igvita.com> Sun, 14 April 2013 21:15 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 A201621F9157 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 14 Apr 2013 14:15:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.976
X-Spam-Level:
X-Spam-Status: No, score=-9.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ydv705v96w3o for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 14 Apr 2013 14:15:33 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id CECE221F913C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 14 Apr 2013 14:15:32 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1URUFE-0004Yv-Bn for ietf-http-wg-dist@listhub.w3.org; Sun, 14 Apr 2013 21:13:52 +0000
Resent-Date: Sun, 14 Apr 2013 21:13:52 +0000
Resent-Message-Id: <E1URUFE-0004Yv-Bn@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <ilya@igvita.com>) id 1URUFC-0004Xq-66 for ietf-http-wg@listhub.w3.org; Sun, 14 Apr 2013 21:13:50 +0000
Received: from mail-qa0-f41.google.com ([209.85.216.41]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <ilya@igvita.com>) id 1URUFB-0007WM-79 for ietf-http-wg@w3.org; Sun, 14 Apr 2013 21:13:50 +0000
Received: by mail-qa0-f41.google.com with SMTP id hg5so531471qab.14 for <ietf-http-wg@w3.org>; Sun, 14 Apr 2013 14:13:23 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:mime-version:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=yqYKc3kNzDvri8JDNVmv22iYIF8w2OrQn13TJNPylmc=; b=jRLEHboS26hbvp+WFrvQcV4cAR41QTtA3Em5ERyZROjeaEHcwJw11/iqTk3HuBTY+B gcI0LuRe0p+IuzVDQX+26zbv1GUaW/qOEnOgS0OA7XTsoLcAf0RBBTG9b6jlrNluS+v5 6YHHjIsI0pwqcan5xwyaE2JyBKIGpjuNkDHeeX3kzkthin96xEuTU1nDBUDeas4wdyXu 4AtmVpzApRmyXi8h17A7qc9xPapC62U0zuIKzAB0T6rT33HyLDPBrN9IXR641PbISdBU 2R7yEe2nao7z07Xh1IXbBv0dQ989+kx5kpUuz06NNcpCaKxHYBaj2MwQ6niUVbyUkvc5 i/rQ==
X-Received: by 10.224.79.18 with SMTP id n18mr20048367qak.85.1365974003178; Sun, 14 Apr 2013 14:13:23 -0700 (PDT)
Received: from mail-qa0-f52.google.com (mail-qa0-f52.google.com [209.85.216.52]) by mx.google.com with ESMTPS id m8sm28366632qav.8.2013.04.14.14.13.21 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 14 Apr 2013 14:13:22 -0700 (PDT)
Received: by mail-qa0-f52.google.com with SMTP id hg5so534399qab.11 for <ietf-http-wg@w3.org>; Sun, 14 Apr 2013 14:13:21 -0700 (PDT)
X-Received: by 10.224.179.202 with SMTP id br10mr6627431qab.83.1365974001217; Sun, 14 Apr 2013 14:13:21 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.49.36.66 with HTTP; Sun, 14 Apr 2013 14:12:41 -0700 (PDT)
From: Ilya Grigorik <ilya@igvita.com>
Date: Sun, 14 Apr 2013 14:12:41 -0700
Message-ID: <CAKRe7JEiryo+Z4m2OMLibY2c4Eb5nZjfEMzoaADKNvshohh7eQ@mail.gmail.com>
To: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="485b397dcdb11d787904da589b2a"
X-Gm-Message-State: ALoCoQk8mNyvMyyXwJ/ycrlZsjINGITS4hSfFCyXFBUfH/5hQV/Ydqqb/BeZJiSRd7VyGYNutETy
Received-SPF: pass client-ip=209.85.216.41; envelope-from=ilya@igvita.com; helo=mail-qa0-f41.google.com
X-W3C-Hub-Spam-Status: No, score=-4.2
X-W3C-Hub-Spam-Report: AWL=-1.625, BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1URUFB-0007WM-79 6fb19b48aebf001398e0395776184299
X-Original-To: ietf-http-wg@w3.org
Subject: HTTP 2.0 "Upgrade" flow
Archived-At: <http://www.w3.org/mid/CAKRe7JEiryo+Z4m2OMLibY2c4Eb5nZjfEMzoaADKNvshohh7eQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17221
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>

> 3.2.  Session Header
>
>  After opening a TCP connection and performing either an HTTP/1.1
>  Upgrade or TLS handshake, the client sends the client session header.
>  The server replies with a server session header.

If the client "knows" that the server is HTTP 2.0 capable (DNS, previous
connection, etc), and wants to skip the HTTP 1.1 Upgrade mechanism and send
"naked" HTTP 2.0 frames from the start (without TLS), I presume it should
still send the session header? As worded above, the behavior is undefined.
I'm guessing, the answer is yes..

> http://tools.ietf.org/html/draft-ietf-httpbis-http2-02#section-2.2
>
> A server that supports HTTP/2.0 can accept the upgrade with a 101
> (Switching Protocols) status code.  After the empty line that
> terminates the 101 response, the server can begin sending HTTP/2.0
> frames.  These frames MUST include a response to the request that
> initiated the Upgrade.

How does this work in light of the client/server session headers? Do we
skip the client session header and send the server session header, followed
by response frames? Or does the client have to wait to get the 101, and
then send the client session header before the connection can proceed?

ig