http请求消息头:
- Accept: text/html,image/* [告诉服务器,我可以接受 文本,网页,图片]
- Accept-Charset: ISO-8859-1 [接受字符编码 iso-8859-1]
- Accept-Encoding: gzip,compress [可以接受 gzip,compress压缩后数据.].
- Accept-Language: en-us,zh-cn [浏览器支持中,英文]
- Host: www.sohu.com:80 [我要找主机是 www.sohu.com:80]
- If-Modified-Since: Tue, 11 Jul 2000 18:23:51 GMT [ 告诉服务器,我的缓冲中有这个资源文件,该文件的时间是 。。。]
- Referer: http://www.sohu.com/index.jsp [告诉服务器,我来自哪里,该消息头,常用于防止盗链]
- User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)[告诉服务器,浏览器内核]
- Connection: close/Keep-Alive [保持连接,发完数据后,我不关闭连接]
- Date: Tue, 11 Jul 2000 18:23:51 GMT [浏览器发送该http请求的时间]
http响应消息头:
1.Location: http://www.baidu.org/index.jsp 【让浏览器重新定位到url】
2. Server:apache tomcat 【告诉浏览器我是tomcat】
3. Content-Encoding: gzip 【告诉浏览器我使用 gzip】
4. Content-Length: 80 【告诉浏览器会送的数据大小80节】
5. Content-Language: zh-cn 【支持中文】
6. Content-Type: text/html; charset=GB2312 [内容格式text/html; 编码gab2312]
7. Last-Modified: Tue, 11 Jul 2000 18:23:51 GMT 【告诉浏览器,该资源上次更新时间】
8. Refresh: 1;url=http://www.baidu.com 【过多久去,刷新到 http://www.baidu.com】
9. Content-Disposition: attachment; filename=aaa.zip 【告诉浏览器,有文件下载】
10. Transfer-Encoding: chunked 【传输的编码]】
11. Expires: -1【告诉浏览器如何缓存页面IE】
12. Cache-Control: no-cache 【告诉浏览器如何缓存页面火狐】
13. Pragma: no-cache 【告诉浏览器如何缓存页面】
14. Connection: close/Keep-Alive 【保持连接 1.1是Keep-Alive】
15. Date: Tue, 11 Jul 2000 18:23:51 GMT