Re: HTTP2 spec HEADERS padding needs clarification

Martin Thomson <martin.thomson@gmail.com> Mon, 16 March 2015 23:24 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ietf.org@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 (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8FEE71ACD2E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 16 Mar 2015 16:24:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.012
X-Spam-Level:
X-Spam-Status: No, score=-7.012 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 cF86PK-3ELoc for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 16 Mar 2015 16:24:41 -0700 (PDT)
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 393C81ACD22 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 16 Mar 2015 16:24:40 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1YXeK8-00020L-Kq for ietf-http-wg-dist@listhub.w3.org; Mon, 16 Mar 2015 23:21:28 +0000
Resent-Date: Mon, 16 Mar 2015 23:21:28 +0000
Resent-Message-Id: <E1YXeK8-00020L-Kq@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.80) (envelope-from <martin.thomson@gmail.com>) id 1YXeK1-0001za-45 for ietf-http-wg@listhub.w3.org; Mon, 16 Mar 2015 23:21:21 +0000
Received: from mail-oi0-f53.google.com ([209.85.218.53]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1YXeJz-0001Kw-S5 for ietf-http-wg@w3.org; Mon, 16 Mar 2015 23:21:21 +0000
Received: by oiag65 with SMTP id g65so51550284oia.2 for <ietf-http-wg@w3.org>; Mon, 16 Mar 2015 16:20:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yofSPyX7GuswElirsOH74NnXi4Rs5CLeKpooYBe79Zs=; b=xHVazIBa5agoQnB6DbDpNnO0vsZ1kzrAmR/65b10c1bOixdZ0sTAh/dcbStZiiup7G dGQ3KErCZw5yXEzIUtrdZ4OKmM+snTEQoKOYc80wTNB3UCBcFnhWuiuMOSP1NnRsuSBt RQDXFNI40QUQE8eV6h/l6o6t0dm2/T/Fpzv235ks9M84PvO2yGEQucNGAlqOYnxDrr/x QFiVwpsaF9TUsljoecbWrG40SuIHI9QkRdaFsADy44yfo8NuMg2Zs5QiHR+U2HmQBY7o f7lMGmfCPm6SdXgGkz3XwX2dnNhUQNFOiTIqHnWQXq+QEMvmR11oo6kkQn4rl1KiDEDL jVSA==
MIME-Version: 1.0
X-Received: by 10.202.229.141 with SMTP id c135mr47698748oih.44.1426548053704; Mon, 16 Mar 2015 16:20:53 -0700 (PDT)
Received: by 10.202.86.20 with HTTP; Mon, 16 Mar 2015 16:20:53 -0700 (PDT)
In-Reply-To: <CAEnbY+dPZEEGeHxNW60ZLgf1LzqA+VMFZHH0c+ggkNaQfwSjvw@mail.gmail.com>
References: <CAEnbY+dPZEEGeHxNW60ZLgf1LzqA+VMFZHH0c+ggkNaQfwSjvw@mail.gmail.com>
Date: Mon, 16 Mar 2015 16:20:53 -0700
Message-ID: <CABkgnnXYd=YkeBdf_Rv-WsHKNOHbQbGYp85kwESPFVzNeKrG4A@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: Daurnimator <quae@daurnimator.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.218.53; envelope-from=martin.thomson@gmail.com; helo=mail-oi0-f53.google.com
X-W3C-Hub-Spam-Status: No, score=-5.9
X-W3C-Hub-Spam-Report: AWL=-0.101, 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, URIBL_BLOCKED=0.001, W3C_IRA=-2, W3C_IRR=-3
X-W3C-Scan-Sig: maggie.w3.org 1YXeJz-0001Kw-S5 62ac7e822b5ab677922cffbdb0ed0691
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HTTP2 spec HEADERS padding needs clarification
Archived-At: <http://www.w3.org/mid/CABkgnnXYd=YkeBdf_Rv-WsHKNOHbQbGYp85kwESPFVzNeKrG4A@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/28976
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 originally thought that this was OK.  But it's not 100%, and I think
that I might ask the RFC editor to fix it.

https://github.com/http2/http2-spec/issues/723
https://github.com/http2/http2-spec/pull/724

This is small, and I'm mostly inclined not to worry.  Does anyone care?

On 16 March 2015 at 11:57, Daurnimator <quae@daurnimator.com> wrote:
> >From 6.2 HEADERS:
>> The HEADERS frame can include padding. Padding fields and flags are identical to
>> those defined for DATA frames (Section 6.1).
>
> >From 6.1 DATA:
>> The total number of padding octets is determined by the value of the Pad Length field.
>> If the length of the padding is the length of the frame payload or greater, the recipient
>> MUST treat this as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
>
> This could do with clarification. The HEADERS frame has additional
> fields around priority.
> i.e. stream dependency, weight.
>
> I assume it should be a protocol error if padding length does not
> leave enough room for weight?
> Or could it be a valid frame for an empty header fragment and a weight
> of 0 that overlaps padding?
>
> Daurn.
>