是http头中允许的多个线性空格 [英] are multiple linear white space allowed in http header

查看:427
本文介绍了是http头中允许的多个线性空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试了解 http:// www。 w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2


HTTP / 1.1头字段值可以如果
延续行以空格或水平制表符开头,则折叠成多行。所有线性
空格(包括折叠)都具有与SP相同的语义。
收件人可以在
解释字段值或转发下游邮件之前用单个SP替换任何线性空格。

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 )


我可以输入任意数量的< CR>< LF>< SP> ,而不会在行上放置任何标题值?
即此有效:标题:< CR>< LF>< SP>< CR>< LF>< SP>价值

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

推荐答案

是的,但请参阅 http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-22 .html#rfc.section.3.2.4.p.3 - 它在即将发布的HTTP规范修订版中已弃用。

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.

这篇关于是http头中允许的多个线性空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆