Re: Stream State and PRIORITY Frames

Scott Mitchell <scott.k.mitch1@gmail.com> Thu, 19 January 2017 00:57 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 90C7212943C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 18 Jan 2017 16:57:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.719
X-Spam-Level:
X-Spam-Status: No, score=-9.719 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-3.199, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 AtvqTXQSU6vc for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 18 Jan 2017 16:57:36 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2E8AC1293EB for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 18 Jan 2017 16:57:36 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1cU0zf-00013O-FW for ietf-http-wg-dist@listhub.w3.org; Thu, 19 Jan 2017 00:54:23 +0000
Resent-Date: Thu, 19 Jan 2017 00:54:23 +0000
Resent-Message-Id: <E1cU0zf-00013O-FW@frink.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <scott.k.mitch1@gmail.com>) id 1cU0zb-000128-Lu for ietf-http-wg@listhub.w3.org; Thu, 19 Jan 2017 00:54:19 +0000
Received: from mail-lf0-f47.google.com ([209.85.215.47]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <scott.k.mitch1@gmail.com>) id 1cU0zT-000226-1i for ietf-http-wg@w3.org; Thu, 19 Jan 2017 00:54:14 +0000
Received: by mail-lf0-f47.google.com with SMTP id z134so24978289lff.3 for <ietf-http-wg@w3.org>; Wed, 18 Jan 2017 16:53:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8cIznw+dyX1vcG56w+gPzwZpYqDQrvK8oXm3EA+YAok=; b=DI3lb8btwMPOQ9kRhLbbFaT+DIA1XP6U9NfN6tfdv9dHzAG38pDQ6T5u8JXzC+u32R N7WFZ451yjn82Xg7sj3YX4fYiJlXY1L/pAOt0zn8/jbrK9W3q7tZKz+j2k+IhRUYTRAh CCLCVDtHW6iIc86rnjF1iL0gjKEa+dfmXbQFnnTw/Gufz2a6kbMpbtASV0cxD0VKSBqN 0EuMkBxXAarTvy99zlgRFzAt3ShBAZWPy10QHrESh+AOoAZhRnB7dgFUZbxB8xpay7mS O+/MOxS3F3s35FPLc9NZt9Avht1KWNZ3rnejx4z5Un5Cr81mMe+I0tfbiCvgJ/9GEqot GX+g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8cIznw+dyX1vcG56w+gPzwZpYqDQrvK8oXm3EA+YAok=; b=FnqvnA6TjMB9LmwV2rXYsXs17vuv4NUFbHdULLHrIbuJkjH1vOaHfPfNxkRk01e9nv YDhMySmXFGLeOHJRdlqtTzvQXJDAGo8Vfc+mGYXOWuZwgCbqUp6lLnkafpeZf1+MsqNk WZoZTDRYbjZPG8NafbWvz4Snf19Meek/Y+V1y5FQNL4UzXtMWlY5FjwJZNs7YZ0DfmEI 7IP8qqLg9BwAblvf8k6E8sFM6UtoIbXEe1TF42cRdiUVhisRDeYRZpjYYcfzKlLL3meh fc8G64dPkNmIId/53/jx+3YezKdj3k19TqAFdADunBr3vj70qUU7ehTCllUk25OK/IjN xk4Q==
X-Gm-Message-State: AIkVDXL9FPLjum5GTuWwlLf4XBwOOP++vD1xZKE6nxAf5zloHZybS3wBMb5cszR7sN04bPGe+nWo9Dmw05cz/A==
X-Received: by 10.46.15.26 with SMTP id 26mr3132619ljp.52.1484787224103; Wed, 18 Jan 2017 16:53:44 -0800 (PST)
MIME-Version: 1.0
Received: by 10.25.18.200 with HTTP; Wed, 18 Jan 2017 16:53:43 -0800 (PST)
In-Reply-To: <C51C3F51-37BE-489F-BA1D-76B101517307@lukasa.co.uk>
References: <CAFn2buAYWHQSWhhoKZ2GKbqXR1A+tScjkAwZmOuQ9gV9jMp2bA@mail.gmail.com> <CAGZNdJWe0Y=M_SWmgYabKbWZwPEuJdw67Km8+UtR4oUtZuXA5A@mail.gmail.com> <2BC01E49-91A1-43A7-AFD0-5A34F2689428@lukasa.co.uk> <CAFn2buDCMwMp=rR0C_yt4-gUwyFhY6ruonz9wT-jVMu+Kir=nA@mail.gmail.com> <C51C3F51-37BE-489F-BA1D-76B101517307@lukasa.co.uk>
From: Scott Mitchell <scott.k.mitch1@gmail.com>
Date: Wed, 18 Jan 2017 16:53:43 -0800
Message-ID: <CAFn2buAE-EdTEG9x-wLQSy5Osmcq1Hdps9YLW_7j9CTV4_Fuyw@mail.gmail.com>
To: Cory Benfield <cory@lukasa.co.uk>
Cc: Benedikt Christoph Wolters <benedikt.wolters@rwth-aachen.de>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="f403043604f20f50c7054667f7a4"
Received-SPF: pass client-ip=209.85.215.47; envelope-from=scott.k.mitch1@gmail.com; helo=mail-lf0-f47.google.com
X-W3C-Hub-Spam-Status: No, score=-3.0
X-W3C-Hub-Spam-Report: AWL=0.262, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1cU0zT-000226-1i e940b21b6ac205536998089f02e6102d
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Stream State and PRIORITY Frames
Archived-At: <http://www.w3.org/mid/CAFn2buAE-EdTEG9x-wLQSy5Osmcq1Hdps9YLW_7j9CTV4_Fuyw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33319
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 Wed, Jan 18, 2017 at 11:50 AM, Cory Benfield <cory@lukasa.co.uk> wrote:

>
> On 18 Jan 2017, at 16:38, Scott Mitchell <scott.k.mitch1@gmail.com> wrote:
>
> This is interesting. If FF is using streams 1-7 then as soon as stream 9
> is used for a HEADERS request that will close streams 1-7 according to
> section 5.1.1:
>
> > first use of a new stream identifier implicitly closes all streams in
> the "idle" state that might have been initiated by that peer with a
> lower-valued stream identifier
>
>
> Only if they are not opened via HEADERS frames, which they are. FF sent (I
> haven’t checked recently) PRIORITY frames for the first few stream IDs, and
> then started sending HEADERS from 1 onwards.
>
>
>

I just ran FF 50.1.0 against a simple local server (TLS+ALPN) and here is
the behavior I observe:

1. Client PRIORITY [StreamId=3,StreamDependency=0,
Weight=201,Exclusive=False] -> Server
2. Client PRIORITY [StreamId=5,StreamDependency=0,
Weight=101,Exclusive=False] -> Server
3. Client PRIORITY [StreamId=7,StreamDependency=0,
Weight=1,Exclusive=False] -> Server
4. Client PRIORITY [StreamId=9,StreamDependency=7,
Weight=1,Exclusive=False] -> Server
5. Client PRIORITY [StreamId=11,StreamDependency=3,
Weight=1,Exclusive=False] -> Server
6. Client HEADERS [StreamId=13,StreamDependency=11,
Weight=2,Exclusive=False] -> Server (a GET "/" request)
7. Client HEADERS [StreamId=15,StreamDependency=0,
Weight=16,Exclusive=False] -> Server (a GET "/favicon.ico" request)

There were other frames (SETTINGS, DATA, PING, WINDOW_UPDATE, GO_AWAY)
which were omitted for the purposes of this discussion.

Based on the RFC it seems like stream ids {3, 5, 7, 11} should be closed at
step (6). Note that FF is not doing anything wrong here. It shouldn't have
to care that the streams are CLOSED in this scenario (assuming these
streams only ever have PRIORITY frames exchanged). It would be interesting
to get a FF dev to comment on the expected stream state here just to be
sure these streams will only be used for PRIORITY. Either way
maintaining/interpreting the priority is at the discretion of the server
and these streams being closed does not impact the server's ability to do
this (as discussed previously the RFC suggests retaining priority for
closed streams).


Cory
>
>