Re: [Technical Errata Reported] RFC7233 (4682)

Kannan Goundan <kannan@cakoose.com> Wed, 04 May 2016 08:51 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 12CF612B00D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 4 May 2016 01:51:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.916
X-Spam-Level:
X-Spam-Status: No, score=-7.916 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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, RP_MATCHES_RCVD=-0.996, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 3NNfUcIDD3n1 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 4 May 2016 01:51:13 -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 BB8FF12B00A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 4 May 2016 01:51:13 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1axsST-00032e-0c for ietf-http-wg-dist@listhub.w3.org; Wed, 04 May 2016 08:47:01 +0000
Resent-Message-Id: <E1axsST-00032e-0c@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 <ylafon@w3.org>) id 1axsSN-00031r-6I for ietf-http-wg@listhub.w3.org; Wed, 04 May 2016 08:46:55 +0000
Received: from raoul.w3.org ([128.30.52.128]) by maggie.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <ylafon@w3.org>) id 1axsSL-0003yj-Dd for ietf-http-wg@w3.org; Wed, 04 May 2016 08:46:54 +0000
Received: from homard.platy.net ([80.67.176.7] helo=[192.168.1.40]) by raoul.w3.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from <ylafon@w3.org>) id 1axsSK-0002Ct-Pz for ietf-http-wg@w3.org; Wed, 04 May 2016 08:46:53 +0000
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
Content-Type: multipart/alternative; boundary="Apple-Mail=_80445994-2071-4EFE-987D-5D831F41719E"
To: Julian Reschke <julian.reschke@greenbytes.de>
From: Kannan Goundan <kannan@cakoose.com>
In-Reply-To: <d52f71ac-ed29-a49f-fcd1-7f467732868b@greenbytes.de>
Resent-From: Yves Lafon <ylafon@w3.org>
Date: Wed, 04 May 2016 07:38:54 +0000
Cc: 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, ietf-http-wg@w3.org
Resent-Date: Wed, 04 May 2016 10:46:52 +0200
Message-Id: <CAM7aVoVqOxKy48CFj73NJ=S7A87So1Fq25HgmXHQECaoQM5q5Q@mail.gmail.com>
X-Name-Md5: efe3dad792d606410c9cc49cedaffc94
References: <20160503224114.D59E1180011@rfc-editor.org> <d52f71ac-ed29-a49f-fcd1-7f467732868b@greenbytes.de>
Resent-To: ietf-http-wg@w3.org
X-Mailer: Apple Mail (2.3124)
X-W3C-Hub-Spam-Status: No, score=-4.5
X-W3C-Hub-Spam-Report: ALL_TRUSTED=-1, BAYES_00=-1.9, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-2.079, W3C_NW=0.5
X-W3C-Scan-Sig: maggie.w3.org 1axsSL-0003yj-Dd 20be01c356c89cf37d3b7fb005e0c23c
X-Original-To: ietf-http-wg@w3.org
Subject: Re: [Technical Errata Reported] RFC7233 (4682)
Archived-At: <http://www.w3.org/mid/CAM7aVoVqOxKy48CFj73NJ=S7A87So1Fq25HgmXHQECaoQM5q5Q@mail.gmail.com>
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31601
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>

My mistake again, sorry!

It looks like I used the first definition of "1#element", intended for producers, instead of the second definition, intended for consumers.

On Tue, May 3, 2016 at 11:51 PM, Julian Reschke <julian.reschke@greenbytes.de <mailto:julian.reschke@greenbytes.de>> wrote:
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 <http://www.rfc-editor.org/errata_search.php?rfc=7233&eid=4682>

--------------------------------------
Type: Technical
Reported by: Kannan Goundan <kannan@cakoose.com <mailto: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 <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 <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 <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