Re: [Technical Errata Reported] RFC7233 (4682)

Julian Reschke <julian.reschke@greenbytes.de> Wed, 04 May 2016 06:59 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 694E612D59E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 3 May 2016 23:59:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.997
X-Spam-Level:
X-Spam-Status: No, score=-7.997 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, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.996, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=greenbytes.de header.b=Sx7BorWc; dkim=pass (1024-bit key) header.d=greenbytes.de header.b=ZCsAdZzA
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 RKH-tmjybeG6 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 3 May 2016 23:59:39 -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 0DD1012D66B for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 3 May 2016 23:59:38 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1axqhC-0005oP-13 for ietf-http-wg-dist@listhub.w3.org; Wed, 04 May 2016 06:54:06 +0000
Resent-Date: Wed, 04 May 2016 06:54:06 +0000
Resent-Message-Id: <E1axqhC-0005oP-13@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <julian.reschke@greenbytes.de>) id 1axqh9-0005nj-Ju for ietf-http-wg@listhub.w3.org; Wed, 04 May 2016 06:54:03 +0000
Received: from mail.greenbytes.de ([5.10.171.186]) by maggie.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from <julian.reschke@greenbytes.de>) id 1axqh7-0005fN-FM; Wed, 04 May 2016 06:54:03 +0000
Received: by mail.greenbytes.de (Postfix, from userid 117) id 39BF415A1337; Wed, 4 May 2016 08:51:09 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1462344669; bh=W2WAa1fx8zpILsYp1yGGYc795vShEAvFbBw2mp+V2yc=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=Sx7BorWcL4mTe+W1wzu3KdPJHLxtimJVjqij7vp5wq8Yy6c/GbmOklg3OcNDAjkDh jhgdhehw1Iqyv3zoqtrc8jzBGMVM4wDIORKGZGYMehQN5F2VRvs16s5niT+lyDBmR1 nzJngdnYikBT0/IqToOSeqpwb1lvPJaaC6W5jdFY=
Received: from [192.168.178.20] (unknown [93.217.79.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id 3EAA315A0230; Wed, 4 May 2016 08:51:04 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1462344667; bh=W2WAa1fx8zpILsYp1yGGYc795vShEAvFbBw2mp+V2yc=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=ZCsAdZzAkgXf14PdmBBgoALTjyDmdioYvmxJczavDUHGlnA75GURQd6rCmosRjsq2 22sxy8mdIfzc0uc9OpDQHWFTXeveipP279VaZM/SzOg1mNge0U4TEZdrGKcFx4NaKo MSK5tgRpfTUP2wjay/4PA7thdOoL88nBOj4JWcts=
To: RFC Errata System <rfc-editor@rfc-editor.org>, fielding@gbiv.com, ylafon@w3.org, ben@nostrum.com, alissa@cooperw.in, aamelnikov@fastmail.fm, mnot@mnot.net
References: <20160503224114.D59E1180011@rfc-editor.org>
Cc: kannan@cakoose.com, ietf-http-wg@w3.org
From: Julian Reschke <julian.reschke@greenbytes.de>
Message-ID: <d52f71ac-ed29-a49f-fcd1-7f467732868b@greenbytes.de>
Date: Wed, 04 May 2016 08:51:08 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0
MIME-Version: 1.0
In-Reply-To: <20160503224114.D59E1180011@rfc-editor.org>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=5.10.171.186; envelope-from=julian.reschke@greenbytes.de; helo=mail.greenbytes.de
X-W3C-Hub-Spam-Status: No, score=-5.8
X-W3C-Hub-Spam-Report: AWL=0.172, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.996, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1axqh7-0005fN-FM 5bb6210f08c50f47fe716fef6df4e22c
X-Original-To: ietf-http-wg@w3.org
Subject: Re: [Technical Errata Reported] RFC7233 (4682)
Archived-At: <http://www.w3.org/mid/d52f71ac-ed29-a49f-fcd1-7f467732868b@greenbytes.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31595
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>

On 2016-05-04 00:41, RFC Errata System wrote:
> The following errata report has been submitted for RFC7233,
> "Hypertext Transfer Protocol (HTTP/1.1): Range Requests".
>
> --------------------------------------
> You may review the report below and at:
> http://www.rfc-editor.org/errata_search.php?rfc=7233&eid=4682
>
> --------------------------------------
> Type: Technical
> Reported by: Kannan Goundan <kannan@cakoose.com>
>
> Section: 2.1
>
> Original Text
> -------------
> byte-range-set= 1#( byte-range-spec / suffix-byte-range-spec )
>
> Corrected Text
> --------------
> According to the "1#element" rule, the expansion would be:
>
>     byte-range-set = ( byte-range-spec /
>         suffix-byte-range-spec ) *( OWS "," OWS ( byte-range-spec /
>         suffix-byte-range-spec ) )
>
> But Appendix D has the definition:
>
>     byte-range-set = *( "," OWS ) ( byte-range-spec /
>         suffix-byte-range-spec ) *( OWS "," [ OWS ( byte-range-spec /
>         suffix-byte-range-spec ) ] )
>
>
> Notes
> -----
> This is a followup to my original report: <http://www.rfc-editor.org/errata_search.php?rfc=7233&eid=4681>
>
> My original report was incorrect because I didn't notice the difference between "1*element" and "1#element".  Thanks to Julian Reschke for pointing this out to me.
>
> After looking up the "1#element" rule <https://tools.ietf.org/html/rfc7230#section-7>, it looks like Section 2.1 and Appendix D are more similar, but not exactly equivalent.
>
> The Appendix D version of the rule seems to allow extra commas and OWS.
> I'm trying to write strict parsing code for this header and am not sure which definition to follow.
>
> P.S. I hope I didn't screw up again.  I apologize for wasting your time (again) if I did.

As far as I can tell, this expansion is exactly as defined in
<https://greenbytes.de/tech/webdav/rfc7230.html#rfc.section.7.p.3>:

> For compatibility with legacy list rules, a recipient MUST parse and ignore a reasonable number of empty list elements: enough to handle common mistakes by senders that merge values, but not so much that they could be used as a denial-of-service mechanism. In other words, a recipient MUST accept lists that satisfy the following syntax:
>
>   #element => [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
>
>   1#element => *( "," OWS ) element *( OWS "," [ OWS element ] )

Best regards, Julian