Stream State and PRIORITY Frames

Scott Mitchell <scott.k.mitch1@gmail.com> Tue, 17 January 2017 06:36 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 EC25E129AB6 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 16 Jan 2017 22:36:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.219
X-Spam-Level:
X-Spam-Status: No, score=-10.219 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, 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 i__-FIAzBYQ6 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 16 Jan 2017 22:36:23 -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 53684129AB5 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 16 Jan 2017 22:36:22 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1cTNKB-0003bT-6d for ietf-http-wg-dist@listhub.w3.org; Tue, 17 Jan 2017 06:32:55 +0000
Resent-Date: Tue, 17 Jan 2017 06:32:55 +0000
Resent-Message-Id: <E1cTNKB-0003bT-6d@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) 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 1cTNK7-0003aF-AD for ietf-http-wg@listhub.w3.org; Tue, 17 Jan 2017 06:32:51 +0000
Received: from mail-lf0-f44.google.com ([209.85.215.44]) by titan.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 1cTNK1-0001LO-1e for ietf-http-wg@w3.org; Tue, 17 Jan 2017 06:32:46 +0000
Received: by mail-lf0-f44.google.com with SMTP id n124so29863043lfd.2 for <ietf-http-wg@w3.org>; Mon, 16 Jan 2017 22:32:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=UPXoYbvDFfG2bsBUcDUlTlmkPZoVHP4GEaouIWxbPHU=; b=Gnaexl/K7gfVIdRxv52AUHiYqa0d9UOVRn5RpvyWSo55/3C8qk/TXvbKRGi+ficwiU /nGf5RLZ8b6skpHDXsk2ez/NqQiTGM4Jws/P9wwnMs81IGywrTD2Oeylna0rENt5oz8O Qqy+rumoOJmN8LXZ2Nry6BSbtQ3BoPeB/ALEcsrZiuVyuA1kURwkbDdKHPiYma5xWEI/ Kx6Aqg+MJLT59PptkT8Gi+KmdEicKgrAYUlrXfz8vNMSU50gSY0E9j3OoCszTNGO24T3 t3ukZ9FSq/eaM5iyxocnTeoxN0hm1rfLzL49mb4Nru3urvDVjOD8T73Y758K1KL+sxs9 Oeww==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=UPXoYbvDFfG2bsBUcDUlTlmkPZoVHP4GEaouIWxbPHU=; b=fuTcTJ7vMGnEcIlLVLfzKizRbUCCowUM3evddVcLH7hOmA2dZeeQDJxdKmXtci33jA l1Pe7pO5YOoYQ9G24+hxZotiOJTBm/aL5/56Uhs682T/cz5+PHkBc0afWchqQyLBI4go 8H+ZAJnvW6cdzO/G357Vxxa5Gbxz8rKNjz+zCHvb3i27UzAT8OhlTYcA5Nld8SHtvn1x 8/kx7lerQST0iyMk0So6gWaqmJParVrCbnmUvX3fdN5Ipnbb3NC6xuMyrPBNpOAZ2xDG vT8mmKnr8CNj04O12nezpd7DqVF5SPGcR4IcJu6F+fHsw5Mdv3FjnmvBFuKiXIKfGp69 h6Fg==
X-Gm-Message-State: AIkVDXJuAWwWT/swXJYcxRltD+eRa+ncgYNa6zlIB8xKTw/gF1Ybv9H0KhE1lDo/sW0LAyx4BJ9HcSy8T3rBEw==
X-Received: by 10.25.34.196 with SMTP id i187mr13531359lfi.176.1484634737168; Mon, 16 Jan 2017 22:32:17 -0800 (PST)
MIME-Version: 1.0
Received: by 10.25.18.200 with HTTP; Mon, 16 Jan 2017 22:32:16 -0800 (PST)
From: Scott Mitchell <scott.k.mitch1@gmail.com>
Date: Mon, 16 Jan 2017 22:32:16 -0800
Message-ID: <CAFn2buAYWHQSWhhoKZ2GKbqXR1A+tScjkAwZmOuQ9gV9jMp2bA@mail.gmail.com>
To: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="001a113a9ea021576a054644765f"
Received-SPF: pass client-ip=209.85.215.44; envelope-from=scott.k.mitch1@gmail.com; helo=mail-lf0-f44.google.com
X-W3C-Hub-Spam-Status: No, score=-3.6
X-W3C-Hub-Spam-Report: AWL=0.122, 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, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1cTNK1-0001LO-1e bcb71dd39318ce8784a4c78a0955a06f
X-Original-To: ietf-http-wg@w3.org
Subject: Stream State and PRIORITY Frames
Archived-At: <http://www.w3.org/mid/CAFn2buAYWHQSWhhoKZ2GKbqXR1A+tScjkAwZmOuQ9gV9jMp2bA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33301
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>

(originally posted here: https://github.com/http2/http2-spec/issues/759)

What is the expected result in terms of stream state and any potential
errors that should be generated from the following scenario:

```
1. Client [PRIORITY, id: 5] -> Server
2. Client [HEADERS, id: 3] -> Server
```

## Option 1
The server accepts both frames. Stream `3` is OPEN and stream `5` remains
in IDLE.

This behavior is verified in the h2spec verification tool via
https://github.com/summerwind/h2spec/pull/67. Also see additional
discussion there.

## Option 2
Should the use of stream ID `5` cause stream ID `3` (and all lower stream
IDs) to be implicitly closed according to the section-5.1.1 (see [1])? This
would mean after the server receives the frame from step (1) it thinks that
stream ID `3` has been closed, and when the server receives the frame from
step (2) it will respond with a connection error of type PROTOCOL_ERROR
(see [2])?

[1] https://tools.ietf.org/html/rfc7540#section-5.1.1
> The 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.

[2] https://tools.ietf.org/html/rfc7540#section-5.1.1
> An endpoint that
   receives an unexpected stream identifier MUST respond with a
   connection error (Section 5.4.1) of type PROTOCOL_ERROR.