W3C home > Mailing lists > Public > ietf-http-wg@w3.org > July to September 2011

line folding - ABNF vs prose

From: Julian Reschke <julian.reschke@gmx.de>
Date: Wed, 27 Jul 2011 15:49:35 +0200
Message-ID: <4E30176F.4080004@gmx.de>
To: HTTP Working Group <ietf-http-wg@w3.org>
<http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-15.html#rfc.section.3.2.p.8> 
says:

"Historically, HTTP header field values could be extended over multiple 
lines by preceding each extra line with at least one space or horizontal 
tab octet (line folding). This specification deprecates such line 
folding except within the message/http media type (Section 10.3.1). 
HTTP/1.1 senders MUST NOT produce messages that include line folding 
(i.e., that contain any field-content that matches the obs-fold rule) 
unless the message is intended for packaging within the message/http 
media type. HTTP/1.1 recipients SHOULD accept line folding and replace 
any embedded obs-fold whitespace with a single SP prior to interpreting 
the field value or forwarding the message downstream."

I think we have mismatch between ABNF and prose here. Consider

"HTTP/1.1 senders MUST NOT produce messages that include line folding 
(i.e., that contain any field-content that matches the obs-fold rule)...."

..but..

   OWS            = *( [ obs-fold ] WSP )
                  ; "optional" whitespace
   obs-fold       = CRLF

...which is ok-ish, because the only way to get obs-fold into the field 
is to have trailing WSP.

But...

"HTTP/1.1 recipients SHOULD accept line folding and replace any embedded 
obs-fold whitespace with a single SP..."

indicates that a sequence of

   obs-fold WSP

should be replaced by

   SP WSP

Wasn't the intention to replace the sequence by a single SP?

Best regards, Julian
Received on Wednesday, 27 July 2011 13:50:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:46 GMT