Re: Stream State and PRIORITY Frames

Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> Tue, 17 January 2017 12:41 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 8AABD12943F for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 17 Jan 2017 04:41:44 -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 Xkl6L8SDyZ3j for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 17 Jan 2017 04:41:42 -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 BA7E31270B4 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 17 Jan 2017 04:41:42 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1cTT25-0002KQ-RW for ietf-http-wg-dist@listhub.w3.org; Tue, 17 Jan 2017 12:38:37 +0000
Resent-Date: Tue, 17 Jan 2017 12:38:37 +0000
Resent-Message-Id: <E1cTT25-0002KQ-RW@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 <tatsuhiro.t@gmail.com>) id 1cTT21-0002BK-35 for ietf-http-wg@listhub.w3.org; Tue, 17 Jan 2017 12:38:33 +0000
Received: from mail-qt0-f181.google.com ([209.85.216.181]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <tatsuhiro.t@gmail.com>) id 1cTT1u-0004Eq-OT for ietf-http-wg@w3.org; Tue, 17 Jan 2017 12:38:27 +0000
Received: by mail-qt0-f181.google.com with SMTP id l7so154863594qtd.1 for <ietf-http-wg@w3.org>; Tue, 17 Jan 2017 04:38:05 -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=xUQ8BVC+hGNFZmjgkXXaiBpa05L8a3tdLHoSti+4dFY=; b=f7o1tYfkMfnNeeuwUhj4cDOtpSN4kFGsSqulsDRdbJMzbHyaHdYa1cspHf0YoMcnbw WbX7By0Mr96GOaXsju3Q5eHK+89o0oAX4cnQzWe6bk1GTw0uH0iPR3621sv2wJhBCA2I y2cZa0jRuSE6LLQAqJA57uzBUlEyO7gMlOa9Rz+k2cyYjrct5EWLMuOVvuwEC+G5xjPj LVW088Ns75fT+qXTkaJQhf+WRauRK0qpudqHkorx4mfS7vGXj48NkTP/RNE0+k0bcmNT g4A7zfrbfFHB7MXI/aqv+pansO4i+HgT1yWDFHSWQmZRlYfcsIhaPvkoZAgPfemVT0GZ SJWA==
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=xUQ8BVC+hGNFZmjgkXXaiBpa05L8a3tdLHoSti+4dFY=; b=LG1JMnCtIdMEmvspHMMMt9gBxdJossCnHK6O+9lJYUCm/uYJB4XKdnRJni7JUzGrDH 1k0HhkP7gep1TiKZ2BZMqAGd0wvRB09L3fEKZKWal9L/AgahmlZxlCnRRGpyDBoZMMxN vRQnVLCwHrLmMikt0rV/dbo4n+OBFLmDwesBhK3Q5SmMxkgE9/ss8dB1rDEai2MD99aB GNIfFHqEH27R3gATFBjUzlwXv1nnPir9kUAdRuC3l63zCYnVhMZ6Yo9unn20ogc30AG/ zLkpzLCX4BiGdIrjnAVF1Txh3W6RBl5u7QpYjN++fT698cYbd52dixtUB4cSHG77fZjK NTLQ==
X-Gm-Message-State: AIkVDXJR9YQinNPkFbZIM2wA381wwlONI9GXVbp5uRbYwwMiLFIYqKvoKBwmjCEoasqxK529BxRZ5RViqam2oQ==
X-Received: by 10.200.42.200 with SMTP id c8mr12421976qta.156.1484656680563; Tue, 17 Jan 2017 04:38:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.12.138.186 with HTTP; Tue, 17 Jan 2017 04:37:40 -0800 (PST)
In-Reply-To: <CAFn2buAYWHQSWhhoKZ2GKbqXR1A+tScjkAwZmOuQ9gV9jMp2bA@mail.gmail.com>
References: <CAFn2buAYWHQSWhhoKZ2GKbqXR1A+tScjkAwZmOuQ9gV9jMp2bA@mail.gmail.com>
From: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
Date: Tue, 17 Jan 2017 21:37:40 +0900
Message-ID: <CAPyZ6=Kh3n+RJi=RqgFBojgRDpfJ=nbr0i4kvO20ET0Kt7UA8Q@mail.gmail.com>
To: Scott Mitchell <scott.k.mitch1@gmail.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="001a1140058e0f2dcf0546499297"
Received-SPF: pass client-ip=209.85.216.181; envelope-from=tatsuhiro.t@gmail.com; helo=mail-qt0-f181.google.com
X-W3C-Hub-Spam-Status: No, score=-5.2
X-W3C-Hub-Spam-Report: AWL=-1.015, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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 1cTT1u-0004Eq-OT 9385ed409ebd194b69b26f16f8d6d8ee
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Stream State and PRIORITY Frames
Archived-At: <http://www.w3.org/mid/CAPyZ6=Kh3n+RJi=RqgFBojgRDpfJ=nbr0i4kvO20ET0Kt7UA8Q@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33303
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>

Hi,

On Tue, Jan 17, 2017 at 3:32 PM, Scott Mitchell <scott.k.mitch1@gmail.com>
wrote:

> (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])?
>
>
​
​I think Option 1 is the expected result.


> [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.
>
>
​If my understanding is correct, this only refers to the new stream ID used
by HEADERS, and PUSH_PROMISE frames which open or reserve streams.  The
example text following that statement uses HEADERS which opens new stream.
PRIORITY frame does not change stream state, and there is no reason to
close all unused streams lower than bearing stream ID.  That said, I agree
that this is not crystal clear in the document.  In practice, this is
probably rather rare case.

Best regards,
Tatsuhiro Tsujikawa



> [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.
>
>