• 全部
  • 问答

谁能帮我写一个例子,http协议中get 。参数如下

ga3ga3 2008-11-30 08:06:23

get整体内容如下,最好请写全了。因为我写了部分,WebRequest中对于Proxy-Connection、UA-CPU等我不知道怎么表达
缺少了部分信息,返回的内容不对。




GET /XXX/userlogin.aspx?name=zcwh&userID=abcde HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, application/x-silverlight, */*
Referer: http://XXXX.XXXX.com/index.htm
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 2.0.50727)
Host: sinayc1.51wan.com
Proxy-Connection: Keep-Alive
Cookie: co=7; uid=1066689; uname=abcde; cname=abcde; money=0; point=100; usertitle=abcde; pk=5565307d697b4897; mp=63b50088b7cb7761; sk=eubjccca5d6jvfg6vedqiisee3
...全文
164 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
风骑士之怒 2008-12-04
up,不知道
回复
vbfaq 2008-12-04
WebProxy
回复
ga3ga3 2008-11-30
fiddler中返回

HTTP/1.1 302 Found
Date: Sun, 30 Nov 2008 10:43:15 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: http://XXX.XX.com/empire/login.cfm?uname=%6D%61%74%61%74%61%78%75%5B%E6%96%B0%E6%B5%AA%5D&vcode=8D22A6AAB9793E9886A0D1D137883FD7&eflag=login&serverid=5
Set-Cookie: ASP.NET_SessionId=jysije455wze0n45ic3wmtem; path=/; HttpOnly
Cache-Control: private
Content-Type: text/html; charset=gb2312
Content-Length: 287

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="http://xxx.xxx.com/empire/login.cfm?unameabcde5D&vcode=8D22A6AAB9793E9886A0D1D137883FD7&eflag=login&serverid=5">here</a>.</h2>
</body></html>


但实际返回的是

"\r\n\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\" >\r\n<head><title>\r\n\t无标题页\r\n</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" /></head>\r\n<body>\r\n <form name=\"form1\" method=\"post\" action=\"xxx.aspx?name=zcwh&userID=abcde&ServerID=5&timestamp=1228048173&who=173&sign=9e300dae17ba99f86478e288c0411875\" id=\"form1\">\r\n<div>\r\n<input type=\"hidden\" name=\"__VIEWSTATE\" id=\"__VIEWSTATE\" value=\"/wEPDwUKLTg2Njc2NjM3M2RkMwNvlTkzBK1S3YB+6DHTdBygXHg=\" />\r\n</div>\r\n\r\n <div>\r\n \r\n </div>\r\n </form>\r\n</body>\r\n</html>\r\n"


我要的就是红色部分内容,获取可以跳转到下一个页面的参数



回复
发帖
.NET技术其他语言
创建于2007-09-28

1814

社区成员

.NET技术 其他语言讨论
申请成为版主
帖子事件
创建了帖子
2008-11-30 08:06
社区公告
暂无公告