Re: Questions on Server Push

Martin Thomson <martin.thomson@gmail.com> Mon, 03 June 2013 16:09 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 DEA3D21F8EAE for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 3 Jun 2013 09:09:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.999
X-Spam-Level:
X-Spam-Status: No, score=-9.999 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, J_CHICKENPOX_48=0.6, 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 RbnpfN7jSKuz for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 3 Jun 2013 09:09:06 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 5440221F8DBC for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 3 Jun 2013 09:09:00 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UjXHC-00058f-B2 for ietf-http-wg-dist@listhub.w3.org; Mon, 03 Jun 2013 16:06:30 +0000
Resent-Date: Mon, 03 Jun 2013 16:06:30 +0000
Resent-Message-Id: <E1UjXHC-00058f-B2@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1UjXGu-00055u-Lo for ietf-http-wg@listhub.w3.org; Mon, 03 Jun 2013 16:06:12 +0000
Received: from mail-we0-f172.google.com ([74.125.82.172]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1UjXGt-000387-FN for ietf-http-wg@w3.org; Mon, 03 Jun 2013 16:06:12 +0000
Received: by mail-we0-f172.google.com with SMTP id q56so1894002wes.3 for <ietf-http-wg@w3.org>; Mon, 03 Jun 2013 09:05:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ySYjsw1wjaIPWaGgFkpGTuvCpTHiLchs470yeSqhASo=; b=HZ6XJUZ+d8MhXZqS3v+pBSP0d5JP5FuvdH4q2ZJfLA2VxqgT6DPzEhAq4ZbMxbzg2O KYZARTN7GMAZxCPOE6zwtJH5a4s8elGVS1uJOTznj2uTPS97vxnnb9+SPsNb+A5avSh/ zsrwFN2NAO9gnn8V9teAIstlAE4ZzWjGIwHoCVnHD9CTvfWZvv4qtjRoPz/1k+RQHPak gAU38dXxHOvVCqkMOd1N2gcKBRnG72TmpquFSHnURxbGBxO52+7Wltc8/68h6Au0IVXc cf5TI+j9Xdd/kAgg8PLuVGsjcGQBKEerA0X+iFF9OBYUpNs/faEju/sJDSjFFvJ5H/m2 y4nA==
MIME-Version: 1.0
X-Received: by 10.180.74.10 with SMTP id p10mr13347884wiv.39.1370275545411; Mon, 03 Jun 2013 09:05:45 -0700 (PDT)
Received: by 10.194.250.10 with HTTP; Mon, 3 Jun 2013 09:05:45 -0700 (PDT)
In-Reply-To: <51A87484.4090501@iij.ad.jp>
References: <51A87484.4090501@iij.ad.jp>
Date: Mon, 03 Jun 2013 09:05:45 -0700
Message-ID: <CABkgnnWPuTp41vYDCbbs+PdDOFc7hCVmNzLJq8CsmHe4Jc-8dQ@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=74.125.82.172; envelope-from=martin.thomson@gmail.com; helo=mail-we0-f172.google.com
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.739, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1UjXGt-000387-FN afaccea72fc7b162dadbd4de1b30b1f1
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Questions on Server Push
Archived-At: <http://www.w3.org/mid/CABkgnnWPuTp41vYDCbbs+PdDOFc7hCVmNzLJq8CsmHe4Jc-8dQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18156
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 31 May 2013 02:59, Shigeki Ohtsu <ohtsu@iij.ad.jp> wrote:
> In the above B case, FINAL flag cannot be set in HEADERS+PRIORITY so
>  we need to know it at first to distinguish the case A.

This isn't quite right.  Only the stream from the server to the client
(the response stream) needs to be open in order to send PUSH_PROMISE.

Note also that your example doesn't show that the pushed resource is
on a different stream to original request.  e.g.:

1. Client -> HEADERS+PRIORITY(Get Request)  -> Server (stream 1)
2. Client <- PUSH_PROMISE <- Server (stream 1)
3. Client <- HEADER(Promised Response) <- Server (stream 2)
4. Client <- DATA(Promised Response) with FINAL <- Server (stream 2)
5. Client <- HEADER(Response) <- Server (stream 1)
6. Client <- DATA with FINAL(Response) <-Server (stream 1)

Also, the ordering isn't strictly this way.  Steps 3,4 and 5,6 can be
interleaved in any order.  The only constraint is that step 6 (the one
containing the FINAL for stream 1) comes after step 2.

> Q3: In above case, no stream was created before step 5 so that
> PUSH_PROMISE was sent on a new stream. This is forbidden in the spec.

This is a case that we haven't completely resolved yet.  My
expectation is that we will define something like: the pre-Upgrade
request implicitly opens stream 1.   See
https://github.com/http2/http2-spec/issues/52