Subject: [Technical Errata Reported] RFC7233 (4682)

From: RFC Errata System <[email-masked]>
Date: Tue, 3 May 2016 15:41:14 -0700 (PDT)

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 <[email-masked]>

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.

Instructions:
-------------
This erratum is currently posted as "Reported". If necessary, please
use "Reply All" to discuss whether it should be verified or
rejected. When a decision is reached, the verifying party (IESG)
can log in to change the status and edit the report, if necessary. 

--------------------------------------
RFC7233 (draft-ietf-httpbis-p5-range-26)
--------------------------------------
Title               : Hypertext Transfer Protocol (HTTP/1.1): Range Requests
Publication Date    : June 2014
Author(s)           : R. Fielding, Ed., Y. Lafon, Ed., J. Reschke, Ed.
Category            : PROPOSED STANDARD
Source              : Hypertext Transfer Protocol Bis APP
Area                : Applications
Stream              : IETF
Verifying Party     : IESG

---

From: Julian Reschke <[email-masked]>
Date: Wed, 4 May 2016 08:51:08 +0200

> "Hypertext Transfer Protocol (HTTP/1.1): Range Requests".

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

---

From: Julian Reschke <[email-masked]>
Date: Wed, 4 May 2016 09:53:35 +0200

On 2016-05-04 09:38, Kannan Goundan wrote:
> 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.

...and I do agree that we could improve the prose around this. Maybe you 
could open a ticket over at <https://github.com/httpwg/http11bis/issues>?

Best regards, Julian

---

From: Kannan Goundan <[email-masked]>
Date: Wed, 04 May 2016 07:38:54 +0000

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 <[email-masked] <mailto:[email-masked]>> 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 <[email-masked] <mailto:[email-masked]>>

Section: 2.1

Original Text
-------------

Corrected Text
--------------

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>>

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.

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>>:

Best regards, Julian