这里无效的请求头名称是什么?

发布于 2024-11-08 17:09:33 字数 2005 浏览 0 评论 0原文

GET http://msdn.microsoft.com/en-us/library/ms737550(v=vs.85).aspx HTTP/1.1
Host: msdn.microsoft.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.17) Gecko/20110420 AlexaToolbar/alxf-2.11 Firefox/3.6.17
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Cookie: A=I&I=AxUFAAAAAAA6BwAAF8HSyidJIZx1KvyAM/QBJw!!&M=1&CS=1175b0002j2020@; TocHashCookie=ms310241(n)/aa139672(n)/ff576017(VS.85,n)/ff576020(VS.85,n)/ff576022(VS.85,n)/ff573209(VS.85,n)/ff573212(VS.85,n)/ff573407(VS.85,n)/ff573625(VS.85,n)/ff573631(VS.85,n)/na/; omniID=1304990477297_007d_a5e4_4a8f_b3cc040ef8ae; WT_FPC=id=116.236.150.80-235145280.30150320:lv=1305713955000:ss=1305712394162; WT_NVR_RU=0=msdn:1=:2=; WT_NVR=0=/:1=en-us:2=en-us/library|zh-cn/library; msresearch=%7B%22version%22%3A%224.6%22%2C%22state%22%3A%7B%22name%22%3A%22IDLE%22%2C%22url%22%3Aundefined%2C%22timestamp%22%3A1304990488606%7D%2C%22lastinvited%22%3A1304990488606%2C%22userid%22%3A%2213049904886068387915347343170%22%2C%22vendorid%22%3A1%2C%22surveys%22%3A%5Bundefined%5D%7D; MC1=GUID=fb6fc2d32e7a924698e043e5f5aff4e6&HASH=d3c2&LV=20115&V=3; msdn=L=2052; mcI=Tue, 24 May 2011 05:51:59 GMT; MUID=0DBD349328166C4B30BF35662D166C8B; MSID=Microsoft.CreationDate=05/17/2011 05:48:18&Microsoft.LastVisitDate=05/18/2011 02:00:06&Microsoft.VisitSt
artDate=05/18/2011 02:00:06&Microsoft.CookieId=979bc6e3-fa2d-4dad-816c-432790d7397e&Microsoft.TokenId=ffffffff-ffff-ffff-ffff-ffffffffffff&Microsoft.NumberOfVisits=5&Microsoft.CookieFirstVisit=1&Microsoft.IdentityToken=AA==&Microsoft.MicrosoftId=0359-2958-1412-9584; TocPosition=0; s_sq=%5B%5BB%5D%5D; s_cc=true; ADS=SN=175A21EF; GsfxSessionCookie=144229042098420446; GsfxStatsLog=true
Cache-Control: max-age=0

上面是从我的程序中转储的,但我不知道哪一部分是无效的......

GET http://msdn.microsoft.com/en-us/library/ms737550(v=vs.85).aspx HTTP/1.1
Host: msdn.microsoft.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.17) Gecko/20110420 AlexaToolbar/alxf-2.11 Firefox/3.6.17
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Cookie: A=I&I=AxUFAAAAAAA6BwAAF8HSyidJIZx1KvyAM/QBJw!!&M=1&CS=1175b0002j2020@; TocHashCookie=ms310241(n)/aa139672(n)/ff576017(VS.85,n)/ff576020(VS.85,n)/ff576022(VS.85,n)/ff573209(VS.85,n)/ff573212(VS.85,n)/ff573407(VS.85,n)/ff573625(VS.85,n)/ff573631(VS.85,n)/na/; omniID=1304990477297_007d_a5e4_4a8f_b3cc040ef8ae; WT_FPC=id=116.236.150.80-235145280.30150320:lv=1305713955000:ss=1305712394162; WT_NVR_RU=0=msdn:1=:2=; WT_NVR=0=/:1=en-us:2=en-us/library|zh-cn/library; msresearch=%7B%22version%22%3A%224.6%22%2C%22state%22%3A%7B%22name%22%3A%22IDLE%22%2C%22url%22%3Aundefined%2C%22timestamp%22%3A1304990488606%7D%2C%22lastinvited%22%3A1304990488606%2C%22userid%22%3A%2213049904886068387915347343170%22%2C%22vendorid%22%3A1%2C%22surveys%22%3A%5Bundefined%5D%7D; MC1=GUID=fb6fc2d32e7a924698e043e5f5aff4e6&HASH=d3c2&LV=20115&V=3; msdn=L=2052; mcI=Tue, 24 May 2011 05:51:59 GMT; MUID=0DBD349328166C4B30BF35662D166C8B; MSID=Microsoft.CreationDate=05/17/2011 05:48:18&Microsoft.LastVisitDate=05/18/2011 02:00:06&Microsoft.VisitSt
artDate=05/18/2011 02:00:06&Microsoft.CookieId=979bc6e3-fa2d-4dad-816c-432790d7397e&Microsoft.TokenId=ffffffff-ffff-ffff-ffff-ffffffffffff&Microsoft.NumberOfVisits=5&Microsoft.CookieFirstVisit=1&Microsoft.IdentityToken=AA==&Microsoft.MicrosoftId=0359-2958-1412-9584; TocPosition=0; s_sq=%5B%5BB%5D%5D; s_cc=true; ADS=SN=175A21EF; GsfxSessionCookie=144229042098420446; GsfxStatsLog=true
Cache-Control: max-age=0

The above is dumped from my programe,but I don't see which part is invalid...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾城°AllureLove 2024-11-15 17:09:33

Cookie 后面的行无效,因为 它需要缩进被解释为折叠

HTTP/1.1 标头字段值可以折叠到多行,如果
连续行以空格或水平制表符开头。全线性
空白(包括折叠)与 SP 具有相同的语义。一个
接收者可以在之前用单个 SP 替换任何线性空白
解释字段值或向下游转发消息。

<前><代码> LWS = [CRLF] 1*( SP | HT )

因此:

Cookie: A=I&I=AxUFAAAAAAA6BwAAF8HSyidJIZx1KvyAM/QBJw!!&M=1&CS=1175b0002j2020@; TocHashCookie=ms310241(n)/aa139672(n)/ff576017(VS.85,n)/ff576020(VS.85,n)/ff576022(VS.85,n)/ff573209(VS.85,n)/ff573212(VS.85,n)/ff573407(VS.85,n)/ff573625(VS.85,n)/ff573631(VS.85,n)/na/; omniID=1304990477297_007d_a5e4_4a8f_b3cc040ef8ae; WT_FPC=id=116.236.150.80-235145280.30150320:lv=1305713955000:ss=1305712394162; WT_NVR_RU=0=msdn:1=:2=; WT_NVR=0=/:1=en-us:2=en-us/library|zh-cn/library; msresearch=%7B%22version%22%3A%224.6%22%2C%22state%22%3A%7B%22name%22%3A%22IDLE%22%2C%22url%22%3Aundefined%2C%22timestamp%22%3A1304990488606%7D%2C%22lastinvited%22%3A1304990488606%2C%22userid%22%3A%2213049904886068387915347343170%22%2C%22vendorid%22%3A1%2C%22surveys%22%3A%5Bundefined%5D%7D; MC1=GUID=fb6fc2d32e7a924698e043e5f5aff4e6&HASH=d3c2&LV=20115&V=3; msdn=L=2052; mcI=Tue, 24 May 2011 05:51:59 GMT; MUID=0DBD349328166C4B30BF35662D166C8B; MSID=Microsoft.CreationDate=05/17/2011 05:48:18&Microsoft.LastVisitDate=05/18/2011 02:00:06&Microsoft.VisitSt
 artDate=05/18/2011 02:00:06&Microsoft.CookieId=979bc6e3-fa2d-4dad-816c-432790d7397e&Microsoft.TokenId=ffffffff-ffff-ffff-ffff-ffffffffffff&Microsoft.NumberOfVisits=5&Microsoft.CookieFirstVisit=1&Microsoft.IdentityToken=AA==&Microsoft.MicrosoftId=0359-2958-1412-9584; TocPosition=0; s_sq=%5B%5BB%5D%5D; s_cc=true; ADS=SN=175A21EF; GsfxSessionCookie=144229042098420446; GsfxStatsLog=true

但由于折叠被解释为单个空格,因此您应该在允许空格的分隔符处折叠该行,而不会像 ; 之后那样掺假值:

Cookie: A=I&I=AxUFAAAAAAA6BwAAF8HSyidJIZx1KvyAM/QBJw!!&M=1&CS=1175b0002j2020@; TocHashCookie=ms310241(n)/aa139672(n)/ff576017(VS.85,n)/ff576020(VS.85,n)/ff576022(VS.85,n)/ff573209(VS.85,n)/ff573212(VS.85,n)/ff573407(VS.85,n)/ff573625(VS.85,n)/ff573631(VS.85,n)/na/; omniID=1304990477297_007d_a5e4_4a8f_b3cc040ef8ae; WT_FPC=id=116.236.150.80-235145280.30150320:lv=1305713955000:ss=1305712394162; WT_NVR_RU=0=msdn:1=:2=; WT_NVR=0=/:1=en-us:2=en-us/library|zh-cn/library; msresearch=%7B%22version%22%3A%224.6%22%2C%22state%22%3A%7B%22name%22%3A%22IDLE%22%2C%22url%22%3Aundefined%2C%22timestamp%22%3A1304990488606%7D%2C%22lastinvited%22%3A1304990488606%2C%22userid%22%3A%2213049904886068387915347343170%22%2C%22vendorid%22%3A1%2C%22surveys%22%3A%5Bundefined%5D%7D; MC1=GUID=fb6fc2d32e7a924698e043e5f5aff4e6&HASH=d3c2&LV=20115&V=3; msdn=L=2052; mcI=Tue, 24 May 2011 05:51:59 GMT;
 MUID=0DBD349328166C4B30BF35662D166C8B; MSID=Microsoft.CreationDate=05/17/2011 05:48:18&Microsoft.LastVisitDate=05/18/2011 02:00:06&Microsoft.VisitStartDate=05/18/2011 02:00:06&Microsoft.CookieId=979bc6e3-fa2d-4dad-816c-432790d7397e&Microsoft.TokenId=ffffffff-ffff-ffff-ffff-ffffffffffff&Microsoft.NumberOfVisits=5&Microsoft.CookieFirstVisit=1&Microsoft.IdentityToken=AA==&Microsoft.MicrosoftId=0359-2958-1412-9584; TocPosition=0; s_sq=%5B%5BB%5D%5D; s_cc=true; ADS=SN=175A21EF; GsfxSessionCookie=144229042098420446; GsfxStatsLog=true

The line after Cookie is invalid as it needs to be indented to be interpreted as a fold:

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 )

Thus:

Cookie: A=I&I=AxUFAAAAAAA6BwAAF8HSyidJIZx1KvyAM/QBJw!!&M=1&CS=1175b0002j2020@; TocHashCookie=ms310241(n)/aa139672(n)/ff576017(VS.85,n)/ff576020(VS.85,n)/ff576022(VS.85,n)/ff573209(VS.85,n)/ff573212(VS.85,n)/ff573407(VS.85,n)/ff573625(VS.85,n)/ff573631(VS.85,n)/na/; omniID=1304990477297_007d_a5e4_4a8f_b3cc040ef8ae; WT_FPC=id=116.236.150.80-235145280.30150320:lv=1305713955000:ss=1305712394162; WT_NVR_RU=0=msdn:1=:2=; WT_NVR=0=/:1=en-us:2=en-us/library|zh-cn/library; msresearch=%7B%22version%22%3A%224.6%22%2C%22state%22%3A%7B%22name%22%3A%22IDLE%22%2C%22url%22%3Aundefined%2C%22timestamp%22%3A1304990488606%7D%2C%22lastinvited%22%3A1304990488606%2C%22userid%22%3A%2213049904886068387915347343170%22%2C%22vendorid%22%3A1%2C%22surveys%22%3A%5Bundefined%5D%7D; MC1=GUID=fb6fc2d32e7a924698e043e5f5aff4e6&HASH=d3c2&LV=20115&V=3; msdn=L=2052; mcI=Tue, 24 May 2011 05:51:59 GMT; MUID=0DBD349328166C4B30BF35662D166C8B; MSID=Microsoft.CreationDate=05/17/2011 05:48:18&Microsoft.LastVisitDate=05/18/2011 02:00:06&Microsoft.VisitSt
 artDate=05/18/2011 02:00:06&Microsoft.CookieId=979bc6e3-fa2d-4dad-816c-432790d7397e&Microsoft.TokenId=ffffffff-ffff-ffff-ffff-ffffffffffff&Microsoft.NumberOfVisits=5&Microsoft.CookieFirstVisit=1&Microsoft.IdentityToken=AA==&Microsoft.MicrosoftId=0359-2958-1412-9584; TocPosition=0; s_sq=%5B%5BB%5D%5D; s_cc=true; ADS=SN=175A21EF; GsfxSessionCookie=144229042098420446; GsfxStatsLog=true

But as a folding is interpreted as a single space, you should fold the line at a separator that allows a space without adulterating the value like after a ;:

Cookie: A=I&I=AxUFAAAAAAA6BwAAF8HSyidJIZx1KvyAM/QBJw!!&M=1&CS=1175b0002j2020@; TocHashCookie=ms310241(n)/aa139672(n)/ff576017(VS.85,n)/ff576020(VS.85,n)/ff576022(VS.85,n)/ff573209(VS.85,n)/ff573212(VS.85,n)/ff573407(VS.85,n)/ff573625(VS.85,n)/ff573631(VS.85,n)/na/; omniID=1304990477297_007d_a5e4_4a8f_b3cc040ef8ae; WT_FPC=id=116.236.150.80-235145280.30150320:lv=1305713955000:ss=1305712394162; WT_NVR_RU=0=msdn:1=:2=; WT_NVR=0=/:1=en-us:2=en-us/library|zh-cn/library; msresearch=%7B%22version%22%3A%224.6%22%2C%22state%22%3A%7B%22name%22%3A%22IDLE%22%2C%22url%22%3Aundefined%2C%22timestamp%22%3A1304990488606%7D%2C%22lastinvited%22%3A1304990488606%2C%22userid%22%3A%2213049904886068387915347343170%22%2C%22vendorid%22%3A1%2C%22surveys%22%3A%5Bundefined%5D%7D; MC1=GUID=fb6fc2d32e7a924698e043e5f5aff4e6&HASH=d3c2&LV=20115&V=3; msdn=L=2052; mcI=Tue, 24 May 2011 05:51:59 GMT;
 MUID=0DBD349328166C4B30BF35662D166C8B; MSID=Microsoft.CreationDate=05/17/2011 05:48:18&Microsoft.LastVisitDate=05/18/2011 02:00:06&Microsoft.VisitStartDate=05/18/2011 02:00:06&Microsoft.CookieId=979bc6e3-fa2d-4dad-816c-432790d7397e&Microsoft.TokenId=ffffffff-ffff-ffff-ffff-ffffffffffff&Microsoft.NumberOfVisits=5&Microsoft.CookieFirstVisit=1&Microsoft.IdentityToken=AA==&Microsoft.MicrosoftId=0359-2958-1412-9584; TocPosition=0; s_sq=%5B%5BB%5D%5D; s_cc=true; ADS=SN=175A21EF; GsfxSessionCookie=144229042098420446; GsfxStatsLog=true
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文