What is the invalid request header name here?
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 Fire开发者_开发问答fox/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...
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
精彩评论