Subject: Re: [Technical Errata Reported] RFC7230 (4189)

From: Barry Leiba <[email-masked]>
Date: Fri, 6 Feb 2015 09:28:12 -0500

I should do something with this errata report; can you give me more
input?  If it's indeed a problem, can the report be edited
appropriately and marked "Verified"?  If so, please tell me what the
edit should be.  If not, give me some explanation that I can put in
for marking it "Held for Document Update".

Barry

On Thu, Nov 27, 2014 at 2:20 AM, Julian Reschke
<[email-masked]> wrote:
> Hi there,
>
> I agree that there is indeed a problem ("the specified field-value rule does
> not allow single field-vchar surrounded by whitespace anywhere.
>
> I'm however not sure that the proposed fix is what we want. In particular,
> it's not clear why we need to modify the header-field production at all.
>
> Best regards, Julian
>
>
>
> On 2014-11-26 20:56, RFC Errata System wrote:
>>
>> The following errata report has been submitted for RFC7230,
>> "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing".
>>
>> --------------------------------------
>> You may review the report below and at:
>> http://www.rfc-editor.org/errata_search.php?rfc=7230&eid=4189
>>
>> --------------------------------------
>> Type: Technical
>> Reported by: Simon Schueppel <[email-masked]>
>>
>> Section: 3.2
>>
>> Original Text
>> -------------
>>       header-field   = field-name ":" OWS field-value OWS
>>
>>       field-name     = token
>>       field-value    = *( field-content / obs-fold )
>>       field-content  = field-vchar [ 1*( SP / HTAB ) field-vchar ]
>>       field-vchar    = VCHAR / obs-text
>>
>>       obs-fold       = CRLF 1*( SP / HTAB )
>>                      ; obsolete line folding
>>                      ; see Section 3.2.4
>>
>> Corrected Text
>> --------------
>>      header-field   = field-name ":" FWS field-value FWS
>>
>>      field-name     = token
>>      FWS            = field-ows
>>      field-value    = [ field-vchar *( field-ows field-vchar ) ]
>>      field-vchar    = VCHAR / obs-text
>>      field-ows      = *( SP / HTAB ) *obs-fold
>>
>>      obs-fold       = CRLF 1*( SP / HTAB )
>>                      ; obsolete line folding
>>                      ; see Section 3.2.4
>>
>> Notes
>> -----
>> the field-value rule given in Section 3.2 will not recognize several
>> strings recognized by specific header rules.
>>
>> Examples:
>>      - ", , ," recognized by legacy list rule
>>      - "abrowser/0.001 (C O M M E N T)" recognized by User-Agent rule
>>      - "gzip , chunked" recognized by Transfer-Encoding rule
>>      - etc.
>>
>> General Problem:
>>      the specified field-value rule does not allow single field-vchar
>> surrounded by whitespace anywhere
>>
>> Further Notes:
>>      -what the authors propably wanted to say:
>>          a string of octets is a field-value if, and only if:
>>              -it is *( field-vchar / SP / HTAB / obs-fold )
>>              -if it is not empty, it starts and ends with field-vchar
>>
>>      -the suggested correction was designed according to these criteria
>>
>> 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.
>>
>> --------------------------------------
>> RFC7230 (draft-ietf-httpbis-p1-messaging-26)
>> --------------------------------------
>> Title               : Hypertext Transfer Protocol (HTTP/1.1): Message
>> Syntax and Routing
>> Publication Date    : June 2014
>> Author(s)           : R. Fielding, Ed., J. Reschke, Ed.
>> Category            : PROPOSED STANDARD
>> Source              : Hypertext Transfer Protocol Bis
>> Area                : Applications
>> Stream              : IETF
>> Verifying Party     : IESG
>>
>
>
> --
> <green/>bytes GmbH, Hafenweg 16, D-48155 Münster, Germany
> Amtsgericht Münster: HRB5782

---

From: "Roy T. Fielding" <[email-masked]>
Date: Fri, 6 Feb 2015 14:32:30 -0800

On Feb 6, 2015, at 6:28 AM, Barry Leiba wrote:
> On Thu, Nov 27, 2014 at 2:20 AM, Julian Reschke <[email-masked]> wrote:

> for marking it "Held for Document Update".

I looked at this originally and thought it made sense, but figured
I would have to check carefully first before responding ... and
then lost it.

It should be verified as technical, but (like Julian) I think the
fix should be limited to field-content and obs-fold:

Section: 3.2

Original Text
-------------
     field-name     = token

Corrected Text
--------------
     field-name     = token
     field-value    = *( field-content / obs-fold )
     field-content  = field-vchar [ 1*( SP / HTAB / field-vchar ) field-vchar ]
     field-vchar    = VCHAR / obs-text

     obs-fold       = OWS CRLF RWS
                    ; obsolete line folding
                    ; see Section 3.2.4

This fixes the problem examples and keeps obs-fold separate from field-content.
It would be best if some other folks could confirm the above before making
the errata official.

....Roy

---

From: Barry Leiba <[email-masked]>
Date: Fri, 6 Feb 2015 18:10:14 -0500

Thanks, Roy!

Julian, does Roy's proposal work for you?

Barry

---

From: Zhong Yu <[email-masked]>
Date: Sat, 7 Feb 2015 06:57:57 -0600

> fix should be limited to field-content and obs-fold:

Roy's proposal still leaves leading/trailing obs-folds inside
field-value, which Simon's proposal tries to address.

The original text, which appears more complicated than necessary, was
probably trying to trim white spaces as well from core elements, a
practice that's consistently followed throughout the RFC.

Zhong Yu