HttpWebRequest返回Section=ResponseStatusLine的问题

hywok 2012-08-27 02:29:07
想写个小工具用WEBrequest从:http://www1.97down.info/qb/file.php/LV0OB8F.html页面下载文件。可是即使是访问这个页面也会返回The server committed a protocol violation. Section=ResponseStatusLine错误。用IE9捕获到访问这个页面的request headers:

Key Value
Request GET http://www1.97down.info/qb/file.php/LV0OB8F.html HTTP/1.1
Accept text/html, application/xhtml+xml, */*
Accept-Language en-US
User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; BOIE9;ENUS)
Accept-Encoding gzip, deflate
Proxy-Connection Keep-Alive
Host www1.97down.info
Pragma no-cache
Cookie CNZZDATA2293212=cnzz_eid=84617230-1345774104-http%253A%252F%252Fmi.99btgc.info%252Fp2p%252F08%252F12-08-23-09-06-18.html&ntime=1346044381&cnzz_a=6&retime=1346046471947&sin=<ime=1346046471947&rtime=2; phmg_br=1

Request body是空。

如果点击下载,用IE9捕获的request headers是:
Key Value
Request POST http://www1.97down.info/qb/down.php HTTP/1.1
Accept text/html, application/xhtml+xml, */*
Referer http://www1.97down.info/qb/file.php/LV0OB8F.html
Accept-Language en-US
User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; BOIE9;ENUS)
Content-Type application/x-www-form-urlencoded
Accept-Encoding gzip, deflate
Host www1.97down.info
Content-Length 38
Proxy-Connection Keep-Alive
Pragma no-cache
Cookie CNZZDATA2293212=cnzz_eid=84617230-1345774104-http%253A%252F%252Fmi.99btgc.info%252Fp2p%252F08%252F12-08-23-09-06-18.html&ntime=1346044381&cnzz_a=7&retime=1346048921927&sin=<ime=1346048921927&rtime=2; phmg_br=1

Request body是:
type=torrent&id=LV0OB8F&name=NHDTA-130

只有30分了。希望哪位闲着的大牛帮个忙。
...全文
363 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
hywok 2012-08-29
  • 打赏
  • 举报
回复
难道没有人关心~
hywok 2012-08-28
  • 打赏
  • 举报
回复
现在Post请求文件的已经解决了,get请求这个html的有高手可以解决吗?
hywok 2012-08-27
  • 打赏
  • 举报
回复
关于加useUnsafeHeaderParsing= "true "这个已经试过了,没有作用

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧