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
回车
回车