HTTP协议

HTTP请求:

请求行   Method Request-URI HTTP-Version CRLF      如:GET /index.html HTTP/1.1        HEAD /index.html HTTP/1.1    POST /index.html HTTP/1.1

消息报头

空行

消息正文

 

HTTP响应:

状态行   HTTP-Version State-Code Reason-Phrase CRLF    如:HTTP/1.1 200 OK

消息报头

空行

消息正文

 

实验:

telnet www.163.com 80

 

GET /index.html HTTP/1.1
Host:www.163.com

回车

回车

 

或:

HEAD /index.html HTTP/1.1
Host:www.163.com

回车

回车

 

 

 

posted @ 2012-06-15 11:18  轻典  阅读(205)  评论(0编辑  收藏  举报