我可以在HTTP request
中制作我自己的标题吗?我可以做我自己的HTTP标头属性吗?
例如 这是normal HTTP request
GET/HTTP/1.1
Host: google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT x.x; xx; rv:x.x.x.x) xxx Firefox/3.0.10 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: xx,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1250,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
,这是头与我的“属性”
GET/HTTP/1.1
Host: google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT x.x; xx; rv:x.x.x.x) xxx Firefox/3.0.10 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: xx,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1250,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Name: John
,我会在服务器响应有“属性”。我将使用HTTP报头的会话属性而不是 “attrubutes” ......
BTW.Sorry,我的英语...;)
请注意,按照惯例,您应该为X定制自定义标题名称。也就是说,称它为X-Name,而不仅仅是名称。 – Stephan202 2009-05-17 18:38:29