|
本帖最后由 Michael_/tp 于 2013-10-13 17:12 编辑
目前有个项目,做模拟登陆提交,在登陆和访问都OK了,但有一个页面post过去总是会RedirectUrl去另一个提示页面,而正常浏览器访问却是OK的。
前面的登陆认证访问都OK的,查资料也OK,
就是提交这个页面时,header和postdata基本都和ie一样了(除了header顺序有几个不一样),但返回的结果ie是200正常,而我的程序却是302跳转提示页。还有什么未考虑到的地方呢??
搞了一个星期都没理出个头绪,望各位大神提点一下。
(不方便提供实际网址)下面提交两组RAM STREAM:
浏览器访问send- POST /xxxxxx.aspx HTTP/1.1
- Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/QVOD, application/QVOD, */*
- Referer: http://xxxxxx.aspx
- Accept-Language: zh-CN
- User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; Tablet PC 2.0; .NET4.0C; .NET4.0E)
- Content-Type: application/x-www-form-urlencoded
- Accept-Encoding: gzip, deflate
- Host: 123.cn
- Content-Length: 514
- Connection: Keep-Alive
- Cache-Control: no-cache
- Cookie: CNZZDATA946534=cnzz_eid%3D982449492-1364719605-%26ntime%3D1381200938%26cnzz_a%3D0%26retime%3D1381200936858%26sin%3D%26ltime%3D1381200936858%26rtime%3D29; ASP.NET_SessionId=2lhg4sfdkxsl1f45fzneymfi
- __VIEWSTATE=%2FwEPDwUJNzYxOTMwNDM5DxYCHgZnZXRCb29nFgICAw9kFgoCAQ8PFgIeBFRleHQFCjIwMTMtMTAtMThkZAIDDw8WAh8BBRUyMOeCueWcuigyMDowMC0yMTowMClkZAIFDxYCHglpbm5lcmh0bWwFATFkAgcPFgIfAgUDMS8wZAIJDw8WBB8BBQ0yMTIxMTI5MzI2NjQwHgdFbmFibGVkaGRkZIr53w%2BDxYTxSgcpJUun1biwgMpD&__EVENTVALIDATION=%2FwEWCAL9xvXyAgKZ%2B%2FryDgKB5YSbDgKM54rGBgK7q7GGCAK%2B9bPHDwKBlc%2ByCAKom6beDWgo%2BubmfA2ePlpY7yBjemsAtpOM&txtVail=lcfj&Button1=%E7%A1%AE%E5%AE%9A%E9%A2%84%E7%BA%A6&HiddenFieldshift_id=161889&HiddenFieldshift_no=30644&hfdLshs=%270%27
复制代码 浏览器访问receive- HTTP/1.1 200 OK
- Date: Sun, 13 Oct 2013 07:53:10 GMT
- Server: WAF
- X-AspNet-Version: 2.0.50727
- Cache-Control: private
- Content-Type: text/html; charset=utf-8
- Content-Length: 5458
- Keep-Alive: timeout=5, max=100
- Connection: Keep-Alive
- (下面正常HTML省略)
复制代码 程序模拟send- POST /xxxxxx.aspx HTTP/1.1
- Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/QVOD, application/QVOD, */*
- Referer: http://xxxxxx.aspx
- Accept-Language: zh-CN
- User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; Tablet PC 2.0; .NET4.0C; .NET4.0E; SE 2.X MetaSr 1.0)
- Content-Type: application/x-www-form-urlencoded
- Accept-Encoding: gzip,deflate
- Connection: Keep-Alive
- Cache-Control: no-cache
- Cookie: CNZZDATA946534=cnzz_eid%3D982449492-1364719605-%26ntime%3D1381200938%26cnzz_a%3D0%26retime%3D1381200936858%26sin%3D%26ltime%3D1381200936858%26rtime%3D29;ASP.NET_SessionId=zvetomf2et12d045p2oddh45
- Host: 123.cn
- Content-Length: 514
- __VIEWSTATE=%2FwEPDwUJNzYxOTMwNDM5DxYCHgZnZXRCb29nFgICAw9kFgoCAQ8PFgIeBFRleHQFCjIwMTMtMTAtMThkZAIDDw8WAh8BBRUyMOeCueWcuigyMDowMC0yMTowMClkZAIFDxYCHglpbm5lcmh0bWwFATFkAgcPFgIfAgUDMS8wZAIJDw8WBB8BBQ0yMTIxMTI5MzI2NjQwHgdFbmFibGVkaGRkZIr53w%2bDxYTxSgcpJUun1biwgMpD&__EVENTVALIDATION=%2FwEWCAL9xvXyAgKZ%2b%2FryDgKB5YSbDgKM54rGBgK7q7GGCAK%2b9bPHDwKBlc%2byCAKom6beDWgo%2bubmfA2ePlpY7yBjemsAtpOM&txtVail=IH42&Button1=%E7%A1%AE%E5%AE%9A%E9%A2%84%E7%BA%A6&HiddenFieldshift_id=161889&HiddenFieldshift_no=30644&hfdLshs=%270%27
复制代码 程序模拟receive- (Status-Line) HTTP/1.1 302 Found
- Date Sun, 13 Oct 2013 07:54:48 GMT
- Server WAF
- X-AspNet-Version 2.0.50727
- Location /xxxx2.aspx
- Cache-Control private
- Content-Type text/html; charset=utf-8
- Content-Length 179
- Keep-Alive timeout=5, max=100
- Connection Keep-Alive
复制代码 xxxx2.aspx 页面是提示"系统繁忙,请稍后再试"
但我每次程序测都是这样跳转,每页浏览器操作都是正常的。
所以可以肯定这个提示只是幌子。
问题:
1.从我程序模拟考虑,还差什么呢?
2.从网站程序考虑,如果RAM STREAM一样的话,可以区别我是程序访问而不是浏览器正常访问吗?
|
|