Re: Design Issue: HEADERS+PRIORITY "MUST be used" for each stream that is created??

James M Snell <jasnell@gmail.com> Fri, 26 April 2013 20:44 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 B378C21F99BA for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 26 Apr 2013 13:44:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.29
X-Spam-Level:
X-Spam-Status: No, score=-10.29 tagged_above=-999 required=5 tests=[AWL=0.309, BAYES_00=-2.599, 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 boHguAWguxMd for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 26 Apr 2013 13:44:55 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 145B621F99B6 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 26 Apr 2013 13:44:55 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UVpV2-0005VF-7O for ietf-http-wg-dist@listhub.w3.org; Fri, 26 Apr 2013 20:44:08 +0000
Resent-Date: Fri, 26 Apr 2013 20:44:08 +0000
Resent-Message-Id: <E1UVpV2-0005VF-7O@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UVpUv-0005TB-0S for ietf-http-wg@listhub.w3.org; Fri, 26 Apr 2013 20:44:01 +0000
Received: from mail-ob0-f176.google.com ([209.85.214.176]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UVpUu-0000Na-Bh for ietf-http-wg@w3.org; Fri, 26 Apr 2013 20:44:00 +0000
Received: by mail-ob0-f176.google.com with SMTP id wd20so3913905obb.21 for <ietf-http-wg@w3.org>; Fri, 26 Apr 2013 13:43:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=+xC584VrxkTBzi7HOJ76loCX6km8BrrWyg6k8+ftQEU=; b=SJYueg/Q2IBlnEwy2tOTKXfi2263oQiMKoH8UW/SjyxfBxGj/LSq3E/0nXt4rt+r/n KLGFWIaITuhlB3pZw1Ksg/u/u8stwhKjRp1GUcqXFAFr8/hsXLJacMLn3e6GNgAlodKD 4seZtwo7hvlDqPWPaUbcyT78+rZWC1LXSbyS67F8ZVTjzp2nFtbdWAc1ZMXb6s2oLPUW 2h2E40i/QntLv0vDL/HZuN0k04/BTTK7dgcuVKY2JQmpx9klJvpngqf+rqdQcPThpmLX FEwaA0VZjXBbxfTb9AoFhYuM5zlMQDWWTHRvpElhRt766gecBi8fh9JMn11sSikt+SZN E+lA==
X-Received: by 10.182.214.38 with SMTP id nx6mr4460299obc.77.1367009014321; Fri, 26 Apr 2013 13:43:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.3.137 with HTTP; Fri, 26 Apr 2013 13:43:14 -0700 (PDT)
In-Reply-To: <CABkgnnUBnr8+_bbFRGMhnWSkGK5N+DoX75m8bHuLfa0Zbq4=CA@mail.gmail.com>
References: <CABP7Rbe808o_rqxnvVvH6OJxqFSvOnoLgnaQT5goFabBF_zi0A@mail.gmail.com> <CABkgnnUBnr8+_bbFRGMhnWSkGK5N+DoX75m8bHuLfa0Zbq4=CA@mail.gmail.com>
From: James M Snell <jasnell@gmail.com>
Date: Fri, 26 Apr 2013 13:43:14 -0700
Message-ID: <CABP7RbeAb71vTmnGbR65wVepyT=WykdRcRNFYDuWoprWD7+2gg@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.214.176; envelope-from=jasnell@gmail.com; helo=mail-ob0-f176.google.com
X-W3C-Hub-Spam-Status: No, score=-3.4
X-W3C-Hub-Spam-Report: AWL=-2.641, 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: maggie.w3.org 1UVpUu-0000Na-Bh 9f3eed9ff884c33b663945fe834d4f69
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Design Issue: HEADERS+PRIORITY "MUST be used" for each stream that is created??
Archived-At: <http://www.w3.org/mid/CABP7RbeAb71vTmnGbR65wVepyT=WykdRcRNFYDuWoprWD7+2gg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17621
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>

I think I disagree on that point and say that I think it's much safer
if we require that streams be initiated with only headers-bearing
frames.

Imagine, for instance, that a sender sends along a DATA frame with a
new, previously unused stream identifier. Without an associated
headers frame I have absolutely no context with which to determine
what I need to do with that DATA frame. Likewise if I receive an
RST_STREAM that references a previously unused stream identifier. If
there's absolutely nothing that I can reliably do with it, or not
reliable way that I can interpret it without additional context, then
we should not allow it.

- James

On Fri, Apr 26, 2013 at 1:12 PM, Martin Thomson
<martin.thomson@gmail.com> wrote:
> The requirement for HEADERS+PRIORITY should only apply to the HTTP
> request/response exchange, not everything.  Tier 3 and all that.
>
> On 26 April 2013 11:47, James M Snell <jasnell@gmail.com> wrote:
>> In the current draft (-02), under the definition of HEADERS+PRIORITY,
>> we say that the frame "MUST be used for each stream that is created"..
>>
>> Is this really true? This is inconsistent with other parts of the spec...
>>
>> Elsewhere we say that streams are created by sending any frame that
>> references an unused stream ID.
>>
>> We also say that PUSH_PROMISE frames are followed up by a HEADERS
>> frame (not HEADERS+PRIORITY).
>>
>> I believe the intent here is that streams ought only to be created
>> when sending a HEADERS, HEADERS+PRIORITY or PUSH_PROMISE frame that
>> references an unused stream ID.
>>
>> A DATA frame that references a previously unused Stream ID ought to
>> result in a PROTOCOL_ERROR.
>>
>> (which brings up an interesting question: what happens if I receive an
>> RST_STREAM that references a previously unused stream id? Based on the
>> rules so far, that would mean the stream ID would be closed before
>> there is ever a chance to use it... possible DOS vector?)
>>