Http range:
/*
* the single part format:
*
* "HTTP/1.0 206 Partial Content" CRLF
* ... header ...
* "Content-Type: image/jpeg" CRLF
* "Content-Length: SIZE" CRLF
* "Content-Range: bytes START-END/SIZE" CRLF
* CRLF
* ... data ...
*
*
* the mutlipart format:
*
* "HTTP/1.0 206 Partial Content" CRLF
* ... header ...
* "Content-Type: multipart/byteranges; boundary=0123456789" CRLF
* CRLF
* CRLF
* "--0123456789" CRLF
* "Content-Type: image/jpeg" CRLF
* "Content-Range: bytes START0-END0/SIZE" CRLF
* CRLF
* ... data ...
* CRLF
* "--0123456789" CRLF
* "Content-Type: image/jpeg" CRLF
* "Content-Range: bytes START1-END1/SIZE" CRLF
* CRLF
* ... data ...
* CRLF
* "--0123456789--" CRLF
*/
Last-Modified\ If-Modified-Since:
Server: NWS_imgcache_HY
Connection: keep-alive
Date: Thu, 12 Dec 2013 08:39:24 GMT
Cache-Control: max-age=259200
Expires: Sun, 15 Dec 2013 08:39:24 GMT
Last-Modified: Fri, 15 Nov 2013 05:57:01 GMT
Content-Type: image/jpeg
Content-Length: 98939
X-Cache-Lookup: Hit From MemCache
//-------------------------------------------------------------------------------------
redirection:
301响应:
HTTP/1.1 301 Moved Permanently Location: http://www.example.org/ Content-Type: text/html Content-Length: 174 <html> <head> <title>Moved</title> </head> <body> <h1>Moved</h1> <p>This page has moved to <a href="http://www.example.org/">http://www.example.org/</a>.</p> </body> </html>
302响应:
Client request:
GET /index.html HTTP/1.1 Host: www.example.com
Server response:
HTTP/1.1 302 Found Location: http://www.iana.org/domains/example/
重定向的新位置通常由Location域提供。
HTTP/1.0 通常使用302,这时通常不对POST请求做进一步的操作(向新url发送请求),而只处理GET的进一步操作。
301是告诉client,永久重定向到新地址,下次请求可直接使用新地址请求。一般编码时,对301,可按302的过程处理。
HTTP/1.1,增加了303和307,303指定client修改verb为GET请求后再向新位置发请求;307指定client不能修改verb,使用原verb向新位置发请求。