您的位置:首页 > 理论基础 > 计算机网络

使用fiddler模拟http get

2017-11-25 14:58 267 查看
wireshark抓到一个http get数据包

GET /Hero/zhCN/client/alert?build=zhCN&targetRegion=0&homeCountry= HTTP/1.1
User-Agent: Blizzard Web Client
Host: nydus.battle.net
Cache-Control: no-cache

HTTP/1.1 302 Found
Date: Sat, 25 Nov 2017 03:15:30 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Cache-Control: max-age=3600
Location: http://INVALID.launcher.battle.net/service/Hero/alert/zh-cn Content-Length: 243
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="http://INVALID.launcher.battle.net/service/Hero/alert/zh-cn">here</a>.</p>
</body></html>

是一个302重定向。

在composer选项卡中,选择get方法,并且把host组装到url中。协议可以在下拉列表中选择。
http://nydus.battle.net//Hero/zhCN/client/alert?build=zhCN&targetRegion=0&homeCountry=


执行完成后,会发现,得到一个http 302重定向。

然后返回的url是http://invalid.launcher.battle.net/service/Hero/alert/zh-cn。对这个url做get请求,协议是http/1.1。

GET http://invalid.launcher.battle.net/service/Hero/alert/zh-cn HTTP/1.1
User-Agent: Blizzard Web Client
Host: invalid.launcher.battle.net
Cache-Control: no-cache

这个请求执行后,是http 502。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: