206 PARTIAL CONTENT

The server is effectively satisfying a range demand for the objective asset by moving at least one pieces of the chose representation that relate to the satisfiable extents found in the request’s Range header field. 

In the event that a solitary part is being moved, the server creating the 206 reaction MUST produce a Content-Range header field, depicting what scope of the chose representation is encased, and a payload comprising of the range. For instance: 

HTTP/1.1 206 Partial Content

Date: Wed, 15 Nov 1995 06:25:24 GMT

Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT

Content-Range: bytes 21010-47021/47022

Content-Length: 26012

Content-Type: image/gif

… 26012 bytes of partial image data …

On the off chance that numerous parts are being moved, the server creating the 206 reaction MUST produce a “multipart/byteranges” payload2, and a Content-Type header field containing the multipart/byteranges media type and its necessary limit parameter. To maintain a strategic distance from disarray with single-part reactions, a server MUST NOT produce a Content-Range header field in the HTTP header segment of a different part reaction (this field will be sent in each part). 

Inside the header zone of each body part in the multipart payload, the server MUST produce a Content-Range header field relating to the range being encased in that body part. On the off chance that the chose representation would have had a Content-Type header field in a 200 OK reaction, the server SHOULD create that equivalent Content-Type field in the header region of each body part. For instance: 

HTTP/1.1 206 Partial Content

Date: Wed, 15 Nov 1995 06:25:24 GMT

Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT

Content-Length: 1741

Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES

–THIS_STRING_SEPARATES

Content-Type: application/pdf

Content-Range: bytes 500-999/8000

…the first range…

–THIS_STRING_SEPARATES

Content-Type: application/pdf

Content-Range: bytes 7000-7999/8000

…the second range

–THIS_STRING_SEPARATES–

At the point when various extents are mentioned, a server MAY blend any of the reaches that cover, or that are isolated by a hole that is littler than the overhead of sending numerous parts, paying little heed to the request in which the relating byte-extend spec showed up in the got Range header field. Since the common overhead between parts of a multipart/byteranges payload is around 80 bytes, contingent upon the chose representation’s media type and the picked limit parameter length, it very well may be less productive to move numerous little disjoint parts than it is to move the whole chose representation. 

A server MUST NOT create a multipart reaction to a request for a solitary extend, since a customer that doesn’t demand different parts probably won’t bolster multipart reactions. In any case, a server MAY create a multipart/byteranges payload with just a solitary body part if numerous extents were mentioned and just one territory was seen as satisfiable or just one territory stayed in the wake of mixing. A customer that can’t procedure a multipart/byteranges reaction MUST NOT produce a request that requests various ranges. 

At the point when a multipart reaction payload is created, the server SHOULD send the parts in a similar request that the relating byte-go spec showed up in the got Range header field, barring those extents that were considered unsatisfiable or that were combine into different reaches. A customer that gets a multipart reaction MUST investigate the Content-Range header field present in each body part so as to figure out which range is contained in that body section; a customer can’t depend on getting similar ranges that it mentioned, nor a similar request that it mentioned. 

At the point when a 206 reaction is created, the server MUST produce the accompanying header fields, notwithstanding those required above, if the field would have been sent in a 200 OK reaction to a similar request: Date, Cache-Control, ETag, Expires, Content-Location, and Vary. 

In the event that a 206 is produced in light of a request with an If-Range header field, the sender SHOULD NOT create other representation header fields past those required above, on the grounds that the customer is comprehended to as of now have an earlier reaction containing those header fields. Something else, the sender MUST produce the entirety of the representation header handle that would have been sent in a 200 OK reaction to a similar request. 

A 206 reaction is cacheable naturally; i.e., except if generally demonstrated by express store controls.

Leave a Reply