Re: #335, was: obs-fold

On 07.02.2012 15:21, Zhong Yu wrote:
> Since OWS and BWS include obs-fold, that would allow generation of
>
> 1  GET / HTTP/1.1
> 2  Host:
> 3
> 4    www.example.com
> 5
> 6  Accept: *
> 7
>
> where line 3 and 5 contain spaces.
>
> The intention seems to be to forbid line folding anywhere in the
> message head. CR/LF are already forbidden in request/response
> line(specifically mentioned in RFC 2616). What's left is
> 'header-field'.
>
> On Mon, Feb 6, 2012 at 7:18 PM, Mark Nottingham wrote:
>> I think "field-value" would work...
>>
>>
>> On 01/02/2012, at 8:00 AM, Julian Reschke wrote:
>>
>>> On 2012-01-30 01:14, Zhong Yu wrote:
>>>> p1 section 3.2.1.
>>>>
>>>>    HTTP senders MUST NOT produce messages that include
>>>>    line folding (i.e., that contain any #field-content# that 
>>>> matches the
>>>>    obs-fold rule)
>>>>
>>>> shouldn't that be
>>>>
>>>>    HTTP senders MUST NOT produce messages that include
>>>>    line folding (i.e., that contain any #header-field# that 
>>>> matches the
>>>>    obs-fold rule)
>>>>
>>>> instead?
>>>>
>>>>      OWS            = *( SP / HTAB / obs-fold )
>>>>      BWS            = OWS
>>>>
>>>>      header-field   = field-name ":" OWS field-value BWS
>>>>      field-name     = token
>>>>      field-value    = *( field-content / obs-fold )
>>>>      field-content  = *( HTAB / SP / VCHAR / obs-text )
>>>
>>> Minimally, this is phrased confusingly. Not being sure what the 
>>> best fix is, I opened a ticket: 
>>> <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/335>
>>>


I'm getting Deja Vu all over again on this thread. Didn't we cover 
these same details with some specific header just last year?

It looks to me like this is a simple case of the draft ABNF not being 
kept up with the WG syntax goal decisions.

These seem to be the intended ABNF the text clauses are describing:

  OWS            = *( SP / HTAB )
  RWS            = 1*( SP / HTAB )
  BWS            = *( OWS / obs-fold )


Accepting that we could make these:

  header-field   = field-name ":" OWS BWS field-value
  field-name     = token
  field-value    = *( field-content BWS )
  field-content  = *( HTAB / SP / VCHAR )


Yes, there seems to be an overlap with the "OWS BWS" productions on 
header-field. But IMO its not a huge problem since its *optional* 
whitespace and does not matter whether the interpreter leaves the 
initial SP/HTAB as OWS or discards it as part of BWS.

AYJ

Received on Tuesday, 7 February 2012 02:55:24 UTC