http status code 206

来源:互联网 发布:java中的socket原理 编辑:程序博客网 时间:2024/04/25 06:22

206 Status Code Explained


A status code of 206 is a response to a request for part of a document. This is used by advanced caching tools, when a user agent requests only a small part of a page, and just that section is returned.


Why it Occurs


The HTTP 206 status code occurs if the response is the result of an If-Range request that used a strong cache validator. The response SHOULD NOT include other entity-headers. If the response is the result of an If-Range request that used a weak validator, the response MUST NOT include other entity-headers; this prevents inconsistencies between cached entity-bodies and updated headers.


What it Means


The response MUST include all of the entity-headers that would have been returned with a 200 (OK) response to the same request.A cache MUST NOT combine a 206 response with other previously cached content if the ETag or Last-Modified headers do not match exactly,A cache that does not support the Range and Content-Range headers MUST NOT cache 206 (Partial) responses.


http server response code 206
206-Partial Content is used in response to a request that includes a header specifying that only part of the content is required. For example, your WHOIS tool only needs to see the HTTP header, 
and perhaps the <HEAD> section of the page -- it doesn't need to load the entire page to perform its function. So it only asks for the first part of the page, and your server complies and indicates
 that it did so by returning the 206 code.

原创粉丝点击