最近在研究请求头、响应头的有效字符,首先看看 rfc2616 关于消息头的定义:
RFC2616 4.2 Message Headers
beyond the common forms.
message-header = field-name ":" [ field-value ] field-name = token field-value = *( field-content | LWS ) field-content = <the OCTETs making up the field-value and consisting of either *TEXT or combinations of token, separators, and quoted-string>
这个是关于消息头的语法定义,其中一些细节在标准的2.2 Basic Rules内定义如下:
CR = <US-ASCII CR, carriage return (13)> LF = <US-ASCII LF, linefeed (10)> SP = <US-ASCII SP, space (32)> HT = <US-ASCII HT, horizontal-tab (9)> CRLF = CR LF LWS = [CRLF] 1*( SP | HT ) OCTET = <any 8-bit sequence of data> CHAR = <any US-ASCII character (octets 0 - 127)> CTL

最低0.47元/天 解锁文章
5536

被折叠的 条评论
为什么被折叠?



