用IEInspector抓的http包:
参考http1.1协议,http://www.cnpaf.net/Class/HTTP/0772522080738754597.html
1.其中的一个ruquest包stream
2.response相应的包stream
3.相应图片的response流
4.报404时候
5.post时的数据包
请求包
回应包
参考http1.1协议,http://www.cnpaf.net/Class/HTTP/0772522080738754597.html
1.其中的一个ruquest包stream
xml 代码
- GET http://www.sina.com.cn/iframe/2006/weather/310100.html HTTP/1.1
- Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
- Referer: http://www.sina.com.cn/
- Accept-Language: zh-cn
- UA-CPU: x86
- Accept-Encoding: gzip, deflate
- If-Modified-Since: Tue, 04 Sep 2007 01:59:52 GMT
- If-None-Match: "a1911b-45f-a5153600"
- User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)
- Proxy-Connection: Keep-Alive
- Host: www.sina.com.cn
- Pragma: no-cache
- Cookie: sinaGlobalRotator_http%3A//www.sina.com.cn/=26; rdl_1_1=1188899343847; rpb_1_0=1188899344037; SINAGLOBAL=210.22.108.98.397911187942276698; SINA_NEWS_CUSTOMIZE_city=%u4E0A%u6D77; vjuids=-1cc3cff55.11496e81190.0.aee5a8a2872e7; vjlast=1188899344; Apache=210.22.108.98.296031188899335707
2.response相应的包stream
xml 代码
- HTTP/1.1 200 OK
- Via: 1.0 HDQSPROXYS01
- Connection: Keep-Alive
- Proxy-Connection: Keep-Alive
- Content-Length: 1119
- Expires: Tue, 04 Sep 2007 09:52:41 GMT
- Date: Tue, 04 Sep 2007 09:50:41 GMT
- Content-Type: text/html
- ETag: "e0791c-45f-a5153600"
- Server: Apache/2.0.54 (Unix)
- Last-Modified: Tue, 04 Sep 2007 01:59:52 GMT
- Accept-Ranges: bytes
- Cache-Control: max-age=120
- Vary: Accept-Encoding
- X-Cache: MISS from 152-77.sina.com.cn
- nnCoection: close
- <html>
- <head>
- <title>上海_天气预报_新浪首页_新浪网title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <meta name="Keywords" content="," />
- <meta name="Description" content="此页面的说明" />
- <style type="text/css">
- body{background: #fff;margin:0;}
- table,td,img,form{border: none;margin: 0;padding: 0;}
- td,p,li,select,input,textarea{font-size:12px;}
- a{text-decoration:underline;}
- a:link{color:#00007f;}
- a:visited{color:#00007f;}
- a:active,a:hover{color:#f00;}
- -->
- style>
- head>
- <body>
- <table width="117" cellspacing="0">
- <tr align="left">
- <td height="18" valign="middle" align="center"><a href="http://php.weather.sina.com.cn/search.php?city=上海" title="" target="_blank">上海a>
- <img src=http://www.sinaimg.cn/dy/weather/images/figure/midrain_small.gif width=14 height=14 alt='中雨' align=absmiddle hspace=3>中雨
- td>
- tr>
- table>
- <table width="117" cellspacing="0" style="line-height:19px;">
- <tr align="left"><td align=center>26℃~24℃td>
- tr>
- table>
- body>
- html>
3.相应图片的response流
xml 代码
- HTTP/1.1 200 OK
- Via: 1.1 HDQSPROXYS01
- Connection: Keep-Alive
- Proxy-Connection: Keep-Alive
- Content-Length: 35
- Expires: Sun, 04 Jul 2004 00:04:00 GMT
- Date: Tue, 04 Sep 2007 09:50:40 GMT
- Content-Type: image/gif
- Server: Apache
- Set-Cookie: vjsid=210.22.108.98.1188899440558079; path=/; expires=Thu, 03-Sep-37 21:50:40 GMT; domain=.wrating.com
- Accept-Ranges: bytes
- Pragma: no-cache
- Cache-Control: no-cache
- GIF89a
4.报404时候
xml 代码
- HTTP/1.1 404 Not Found
- Date: Tue, 04 Sep 2007 18:00:14 GMT
- Content-Length: 1214
- Content-Type: text/html
- Connection: Close
- >
- <HTML>
- <HEAD>
- <TITLE>Error 404--Not FoundTITLE>
- <META NAME="GENERATOR" CONTENT="WebLogic Server">
- HEAD>
- <BODY bgcolor="white">
- <FONT FACE=Helvetica><BR CLEAR=all>
- <TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>
- <FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 404--Not FoundH2>
- FONT>TD>TR>
- TABLE>
- <TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% BGCOLOR=white><FONT FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068 <i>Hypertext Transfer Protocol -- HTTP/1.1i>:H3>
- FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.4.5 404 Not FoundH4>
- FONT><P><FONT FACE="Courier New">The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.p><p>If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.FONT>P>
- FONT>TD>TR>
- TABLE>
- BODY>
- HTML>
5.post时的数据包
xml 代码
- POST /es/logging.do?method=logon HTTP/1.1
- Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
- Referer: http://localhost:8080/es/logging.do?method=toLogon
- Accept-Language: zh-cn
- Content-Type: application/x-www-form-urlencoded
- UA-CPU: x86
- Accept-Encoding: gzip, deflate
- User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)
- Host: localhost:8080
- Content-Length: 57
- Connection: Keep-Alive
- Cache-Control: no-cache
- Cookie: JSESSIONID=AE72735A180C654A598B19E2F000FB26
- logonName=admin&password=111111&Submit=%E7%99%BB%E5%BD%95
请求包
xml 代码
- Accept 接收
- Referer 提交者
- Accept-Language 接收语言
- Accept-Encoding 接收编码
- UA-CPU 用户cpu
- If-Modified-Since假如修改
- If-None-Match 假如不匹
- User-Agent 用户代理
- Proxy-Connection代理连接
- Host 主机
- Pragma 缓存
回应包
xml 代码
- via 路由
- Content-Length 内容长度
- Expires 过期
- Date 日期
- Content-Type 内容类型
- ETag 应答报头域提供了请求变量的当前实体标签。
- Server 服务器类型
- Last-Modified 最后修改,一缓存条目在最后修改期后未经修改则被认为是有效的.
- Accept-Ranges 接收范围
- Cache-Control 缓存控制max-age=120,最大时限(秒)
- Vary 更正
- X-Cache 表示你的 http request 是由 proxy server 回的MISS 表 proxy 無資料,代理動作, HIT 表 proxy 直接回應
- nnCoection
3099

被折叠的 条评论
为什么被折叠?



