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

James M Snell <> Fri, 26 April 2013 20:55 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 21CA021F99BD for <>; Fri, 26 Apr 2013 13:55:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -10.324
X-Spam-Status: No, score=-10.324 tagged_above=-999 required=5 tests=[AWL=0.275, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id mNktQ21rvsMY for <>; Fri, 26 Apr 2013 13:55:27 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 46FB021F99A9 for <>; Fri, 26 Apr 2013 13:55:27 -0700 (PDT)
Received: from lists by with local (Exim 4.72) (envelope-from <>) id 1UVpfg-0004c6-DK for; Fri, 26 Apr 2013 20:55:08 +0000
Resent-Date: Fri, 26 Apr 2013 20:55:08 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtp (Exim 4.72) (envelope-from <>) id 1UVpfb-0004Pj-PL for; Fri, 26 Apr 2013 20:55:03 +0000
Received: from ([]) by with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <>) id 1UVpfa-0000ov-Iw for; Fri, 26 Apr 2013 20:55:03 +0000
Received: by with SMTP id m6so4443130oag.12 for <>; Fri, 26 Apr 2013 13:54:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=MRtqrNYlw4jnSzslRP3u6gV1wRUNlvU5YXl2Vl9jtxY=; b=Xr5fSmj/V7kCDbXAyWyu3VtWTM1M3K2GPX6s/L1gJZCMzEtzrYQgh2rTakFudDyOyT q7YxMvLt6201lyqerF3+5taJ/z/fUDsgaHWJGhSj7KBZXG2epLFslFuJOD4g0M0wve8/ dmbDpkt7OZ7olUF5z8m8XOCfczUnct/5PnsMDGI117GIcA+XHaxqkiGrWFaZp/K3Bm3P hH3rYMtBNBdiHDFPHskJsBt27HjplxZTg67pN2x9iiAya4FA2TXx2BReGIL4uw7N4h8Z CRyWoKHnQ3m5LYyd3HtDhU8FXtQjqEXGeQ98JJUpAmatMhybDptekJ6TsgjrZDpYWU9B CeZg==
X-Received: by with SMTP id k3mr23960870oer.97.1367009676442; Fri, 26 Apr 2013 13:54:36 -0700 (PDT)
MIME-Version: 1.0
Received: by with HTTP; Fri, 26 Apr 2013 13:54:16 -0700 (PDT)
In-Reply-To: <>
References: <> <> <> <>
From: James M Snell <>
Date: Fri, 26 Apr 2013 13:54:16 -0700
Message-ID: <>
To: Martin Thomson <>
Cc: "" <>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=;;
X-W3C-Hub-Spam-Status: No, score=-3.4
X-W3C-Hub-Spam-Report: AWL=-2.613, 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: 1UVpfa-0000ov-Iw fdf25600ef3bb4096d25467806943e4f
Subject: Re: Design Issue: HEADERS+PRIORITY "MUST be used" for each stream that is created??
Archived-At: <>
X-Mailing-List: <> archive/latest/17625
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

Well, until that case is made, we don't have very many good reasons to
allow DATA frames with preceding headers-bearing frames. Also, keep in
mind that it's perfectly legal to send a HEADERS frame with an empty
set of HEADERS. It the WebSockets case does not require any preceding
headers (which I rather doubt), it would still be simple enough to
send an empty HEADERS frame to establish the stream before sending the
DATA frames.

On Fri, Apr 26, 2013 at 1:49 PM, Martin Thomson
<> wrote:
> On 26 April 2013 13:43, James M Snell <> wrote:
>> 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.
> I believe that this is exactly the scenario that the websockets
> binding will take advantage of.  (Maybe there is some need to expose
> some header information there, but that's a case that needs to be made
> for that specific use of the framing layer.)