Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

are multiple linear white space allowed in http header

I'm trying to understand http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2

HTTP/1.1 header field values can be folded onto multiple lines if the continuation line begins with a space or horizontal tab. All linear white space, including folding, has the same semantics as SP. A recipient MAY replace any linear white space with a single SP before interpreting the field value or forwarding the message downstream.

   LWS            = [CRLF] 1*( SP | HT )

Can i put any number of <CR><LF><SP>, without putting any header value on the line ? i.e. is this valid : Header:<CR><LF><SP><CR><LF><SP>Value

like image 319
vrdhn Avatar asked Jul 04 '13 06:07

vrdhn


1 Answers

Yes, but see http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-22.html#rfc.section.3.2.4.p.3 - it's deprecated in the upcoming revision of the HTTP spec.

like image 118
Julian Reschke Avatar answered Sep 28 '22 02:09

Julian Reschke