1. 报文结构
1.1 请求报文
eg.
GET / HTTP/1.1
Host : hackr .jp
结果为:
User-Agent : Mozilla/5.0 (wWindows NT 6.1; WOw64; rv:13.0)Gecko/=20100101 Firefox/13.0
Accept: text/html , application/xhtml +xml , application/xml ;q=0.9,=*/*;q=0.8
Accept-Language: ja, en-us;q=0 . 7,en;q-o.3Accept-Encoding: gzip, deflate
DNT:1
Connection: keep-alive
If-Modified-since: Fri,31 Aug 2007 02:02:20 GMTIf-None-Match: "45bae1-16a-46d776ac"
Cache-Control : max-age=0
1.2 响应报文
eg.
HTTP/1.1 304 Not Modified
Date: Thu,07 Jun 2012 07;21:36 GMTServer: Apache
connection: close
Etag: "4 5bae1-16a-46d776ac"