Http请求流程,模拟Http请求

来源:互联网 发布:洛阳农村淘宝招聘 编辑:程序博客网 时间:2024/04/30 20:51

转自:http://www.cnblogs.com/stg609/archive/2008/07/06/1236966.html

 

 

 其中模拟中发现只用打

telnet www.baidu.com 80

 

回车

CTRL+]

回车

GET / HTTP/1.1

回车

 

就看到返回信息了,打host反而不行

 

这又是一个解决

http://blog.chinaunix.net/u2/73823/showart_2013195.html

 

 

总结:

GET / HTTP/1.1      //客户发送的请求信息

 

 

//这是返回信息,省略了后面的网页源代码

 

HTTP/1.1 200 OK 

Date: Thu, 30 Jul 2009 03:42:18 GMT
Server: Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch5~pu1 mod_perl/2.0.2 Perl/v5.8.8
Last-Modified: Thu, 30 Jul 2009 03:21:07 GMT
ETag: "320692-19e-cb5d6ec0"
Accept-Ranges: bytes
Content-Length: 414
Content-Type: text/html; charset=UTF-8

......

 

原创粉丝点击