W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2019

Re: [Technical Errata Reported] RFC7230 (4189)

From: Julian Reschke <julian.reschke@gmx.de>
Date: Wed, 27 Mar 2019 17:29:08 +0100
To: Amos Jeffries <squid3@treenet.co.nz>, ietf-http-wg@w3.org
Message-ID: <db8d567c-63c9-e711-5206-0a6daa449958@gmx.de>
On 21.04.2015 15:46, Amos Jeffries wrote:
> On 22/04/2015 1:13 a.m., Julian Reschke wrote:
>> On 2015-02-06 23:32, Roy T. Fielding wrote:
>>> ...
>>> 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
>>>        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
>>> --------------
>>>        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.
>>
>> Looks right to me.
>>
>> The one thing I'd change is to change
>>
>>    obs-fold       = OWS CRLF RWS
>>
>> to
>>
>>    obs-fold       = OWS CRLF 1*( SP / HTAB )
>>
>> to minimize the diff from the RFC.
>>
>> Best regards, Julian
>>
>>
>
> Seems to me that neither version allows matching of field-content
> consisting of exactly 2 characters. eg. "Content-Length:10\r\n"
>
> If I am reading that right the part inside the [] always matches 2+
> characters at a time. So we have 1 character, or 3+ characters.
>
> This pattern would fix:
>   field-vchar [ *( SP / HTAB / field-vchar ) field-vchar ]

Hm. Old thread :-)

So the question was whether

   "Content-Length:10\r\n"

that is the field value

   "10"

matches the corrected field-value ABNF:

>  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

"1" matches field-content, so does "0". field-value is sequence of
field-value or obs-fold. So where is the issue?

Best regards, Julian
Received on Wednesday, 27 March 2019 16:30:47 UTC

This archive was generated by hypermail 2.3.1 : Monday, 9 September 2019 17:48:42 UTC