Changeset 2152 for draft-ietf-httpbis/latest
- Timestamp:
- 23/01/13 11:09:13 (10 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p5-range.html
r2151 r2152 587 587 </li> 588 588 <li><a href="#rfc.section.4">4.</a> <a href="#range.response">Responses to a Range Request</a><ul> 589 <li><a href="#rfc.section.4.1">4.1</a> <a href="#rfc.section.4.1">Response to a Single and Multiple Ranges Request</a></li> 590 <li><a href="#rfc.section.4.2">4.2</a> <a href="#status.206">206 Partial Content</a></li> 591 <li><a href="#rfc.section.4.3">4.3</a> <a href="#status.416">416 Range Not Satisfiable</a></li> 592 <li><a href="#rfc.section.4.4">4.4</a> <a href="#header.content-range">Content-Range</a></li> 593 <li><a href="#rfc.section.4.5">4.5</a> <a href="#combining.byte.ranges">Combining Ranges</a></li> 589 <li><a href="#rfc.section.4.1">4.1</a> <a href="#status.206">206 Partial Content</a></li> 590 <li><a href="#rfc.section.4.2">4.2</a> <a href="#header.content-range">Content-Range</a></li> 591 <li><a href="#rfc.section.4.3">4.3</a> <a href="#combining.byte.ranges">Combining Ranges</a></li> 592 <li><a href="#rfc.section.4.4">4.4</a> <a href="#status.416">416 Range Not Satisfiable</a></li> 594 593 </ul> 595 594 </li> … … 653 652 <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a> <a id="range.units" href="#range.units">Range Units</a></h1> 654 653 <p id="rfc.section.2.p.1">A representation can be partitioned into subranges according to various structural units, depending on the structure inherent 655 in the representation's media type. This "<dfn>range unit</dfn>" is used in the <a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> (<a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges.1" title="Accept-Ranges">Section 2.3</a>) response header field to advertise support for range requests, the <a href="#header.range" class="smpl">Range</a> (<a href="#header.range" id="rfc.xref.header.range.1" title="Range">Section 3.1</a>) request header field to delineate the parts of a representation that are requested, and the <a href="#header.content-range" class="smpl">Content-Range</a> (<a href="#header.content-range" id="rfc.xref.header.content-range.1" title="Content-Range">Section 4. 4</a>) payload header field to describe which part of a representation is being transferred.654 in the representation's media type. This "<dfn>range unit</dfn>" is used in the <a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> (<a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges.1" title="Accept-Ranges">Section 2.3</a>) response header field to advertise support for range requests, the <a href="#header.range" class="smpl">Range</a> (<a href="#header.range" id="rfc.xref.header.range.1" title="Range">Section 3.1</a>) request header field to delineate the parts of a representation that are requested, and the <a href="#header.content-range" class="smpl">Content-Range</a> (<a href="#header.content-range" id="rfc.xref.header.content-range.1" title="Content-Range">Section 4.2</a>) payload header field to describe which part of a representation is being transferred. 656 655 </p> 657 656 <div id="rfc.figure.u.1"></div><pre class="inline"><span id="rfc.iref.g.1"></span><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span> <a href="#range.units" class="smpl">range-unit</a> = <a href="#byte.ranges" class="smpl">bytes-unit</a> / <a href="#range.units.other" class="smpl">other-range-unit</a> … … 779 778 </p> 780 779 <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> <a id="range.response" href="#range.response">Responses to a Range Request</a></h1> 781 <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> Response to a Single and Multiple Ranges Request 782 </h2> 783 <p id="rfc.section.4.1.p.1">When an HTTP message includes the content of a single range (for example, a response to a request for a single range, or to 780 <div id="rfc.iref.20"></div> 781 <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> <a id="status.206" href="#status.206">206 Partial Content</a></h2> 782 <p id="rfc.section.4.1.p.1">The <dfn>206 (Partial Content)</dfn> status code indicates that the server has fulfilled the partial GET request for the resource. The request <em class="bcp14">MUST</em> have included a <a href="#header.range" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.2" title="Range">Section 3.1</a>) indicating the desired range, and <em class="bcp14">MAY</em> have included an <a href="#header.if-range" class="smpl">If-Range</a> header field (<a href="#header.if-range" id="rfc.xref.header.if-range.2" title="If-Range">Section 3.2</a>) to make the request conditional. 783 </p> 784 <p id="rfc.section.4.1.p.2">When an HTTP message includes the content of a single range (for example, a response to a request for a single range, or to 784 785 a request for a set of ranges that overlap without any holes), this content is transmitted with a <a href="#header.content-range" class="smpl">Content-Range</a> header field, and a <a href="p1-messaging.html#header.content-length" class="smpl">Content-Length</a> header field showing the number of bytes actually transferred. For example, 785 786 </p> … … 790 791 Content-Length: 26012 791 792 Content-Type: image/gif 792 </pre><p id="rfc.section.4.1.p. 3">When an HTTP message includes the content of multiple ranges (for example, a response to a request for multiple non-overlapping793 </pre><p id="rfc.section.4.1.p.4">When an HTTP message includes the content of multiple ranges (for example, a response to a request for multiple non-overlapping 793 794 ranges), these are transmitted as a multipart message. The multipart media type used for this purpose is "multipart/byteranges" 794 795 as defined in <a href="#internet.media.type.multipart.byteranges" title="Internet Media Type multipart/byteranges">Appendix A</a>. 795 796 </p> 796 <p id="rfc.section.4.1.p.4">A server <em class="bcp14">MAY</em> combine requested ranges when those ranges are overlapping (see <a href="#overlapping.ranges" title="Overlapping Ranges">Section 6.1</a>). 797 </p> 798 <p id="rfc.section.4.1.p.5">A response to a request for a single range <em class="bcp14">MUST NOT</em> be sent using the multipart/byteranges media type. A response to a request for multiple ranges, whose result is a single range, <em class="bcp14">MAY</em> be sent as a multipart/byteranges media type with one part. A client that cannot decode a multipart/byteranges message <em class="bcp14">MUST NOT</em> ask for multiple ranges in a single request. 799 </p> 800 <p id="rfc.section.4.1.p.6">When a client asks for multiple ranges in one request, the server <em class="bcp14">SHOULD</em> send them in the order that they appeared in the request. 801 </p> 802 <div id="rfc.iref.20"></div> 803 <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a> <a id="status.206" href="#status.206">206 Partial Content</a></h2> 804 <p id="rfc.section.4.2.p.1">The <dfn>206 (Partial Content)</dfn> status code indicates that the server has fulfilled the partial GET request for the resource. The request <em class="bcp14">MUST</em> have included a <a href="#header.range" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.2" title="Range">Section 3.1</a>) indicating the desired range, and <em class="bcp14">MAY</em> have included an <a href="#header.if-range" class="smpl">If-Range</a> header field (<a href="#header.if-range" id="rfc.xref.header.if-range.2" title="If-Range">Section 3.2</a>) to make the request conditional. 805 </p> 806 <p id="rfc.section.4.2.p.2">When a 206 response is generated, the sender <em class="bcp14">MUST</em> generate the following header fields: 797 <p id="rfc.section.4.1.p.5">A server <em class="bcp14">MAY</em> combine requested ranges when those ranges are overlapping (see <a href="#overlapping.ranges" title="Overlapping Ranges">Section 6.1</a>). 798 </p> 799 <p id="rfc.section.4.1.p.6">A response to a request for a single range <em class="bcp14">MUST NOT</em> be sent using the multipart/byteranges media type. A response to a request for multiple ranges, whose result is a single range, <em class="bcp14">MAY</em> be sent as a multipart/byteranges media type with one part. A client that cannot decode a multipart/byteranges message <em class="bcp14">MUST NOT</em> ask for multiple ranges in a single request. 800 </p> 801 <p id="rfc.section.4.1.p.7">When a client asks for multiple ranges in one request, the server <em class="bcp14">SHOULD</em> send them in the order that they appeared in the request. 802 </p> 803 <p id="rfc.section.4.1.p.8">When a 206 response is generated, the sender <em class="bcp14">MUST</em> generate the following header fields: 807 804 </p> 808 805 <ul> 809 <li>Either a <a href="#header.content-range" class="smpl">Content-Range</a> header field (<a href="#header.content-range" id="rfc.xref.header.content-range.2" title="Content-Range">Section 4.4</a>) indicating the range included with this response, or a multipart/byteranges <a href="p2-semantics.html#header.content-type" class="smpl">Content-Type</a> including Content-Range fields for each part. If a <a href="p1-messaging.html#header.content-length" class="smpl">Content-Length</a> header field is present in the response, its value <em class="bcp14">MUST</em> match the actual number of octets transmitted in the message body. 810 </li> 811 <li>Date</li> 806 <li>Either a <a href="#header.content-range" class="smpl">Content-Range</a> header field (<a href="#header.content-range" id="rfc.xref.header.content-range.2" title="Content-Range">Section 4.2</a>) indicating the single range included with this response, or a multipart/byteranges <a href="p2-semantics.html#header.content-type" class="smpl">Content-Type</a> indicating that multiple ranges are enclosed as multipart body-parts. 807 </li> 808 <li> <a href="p2-semantics.html#header.date" class="smpl">Date</a> 809 </li> 812 810 <li> <a href="p6-cache.html#header.cache-control" class="smpl">Cache-Control</a>, <a href="p4-conditional.html#header.etag" class="smpl">ETag</a>, <a href="p6-cache.html#header.expires" class="smpl">Expires</a>, <a href="p2-semantics.html#header.content-location" class="smpl">Content-Location</a> and/or <a href="p2-semantics.html#header.vary" class="smpl">Vary</a>, if the header field would have been sent in a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response to the same request 813 811 </li> 814 812 </ul> 815 <p id="rfc.section.4.2.p.3">If a 206 is generated in response to a request with an <a href="#header.if-range" class="smpl">If-Range</a> header field, the sender <em class="bcp14">SHOULD NOT</em> generate other representation header fields beyond those described above. Otherwise, the sender <em class="bcp14">MUST</em> generate all of the same representation header fields that would have been sent in a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response to the same request. 816 </p> 817 <p id="rfc.section.4.2.p.4">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 206 responses. 818 </p> 819 <div id="rfc.iref.20"></div> 820 <h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a> <a id="status.416" href="#status.416">416 Range Not Satisfiable</a></h2> 821 <p id="rfc.section.4.3.p.1">The <dfn>416 (Range Not Satisfiable)</dfn> status code indicates that none of the ranges-specifier values in the request's <a href="#header.range" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.3" title="Range">Section 3.1</a>) overlap the current extent of the selected resource and the request did not include an <a href="#header.if-range" class="smpl">If-Range</a> header field (<a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section 3.2</a>). (For byte-ranges, this means that the first-byte-pos of all of the byte-range-spec values were greater than the current 822 length of the selected representation.) 823 </p> 824 <p id="rfc.section.4.3.p.2">When this status code is sent in response to a byte-range request, the sender <em class="bcp14">SHOULD</em> generate a <a href="#header.content-range" class="smpl">Content-Range</a> header field specifying the current length of the selected representation (see <a href="#header.content-range" id="rfc.xref.header.content-range.3" title="Content-Range">Section 4.4</a>). 825 </p> 826 <div id="rfc.figure.u.18"></div> 827 <p>For example:</p> <pre class="text">HTTP/1.1 416 Range Not Satisfiable 828 Date: Mon, 20 Jan 2012 15:41:54 GMT 829 Content-Range: bytes */47022 830 Content-Type: image/gif 831 </pre><div class="note" id="rfc.section.4.3.p.4"> 832 <p> <b>Note:</b> Clients cannot depend on servers to send a <a href="#status.416" class="smpl">416 (Range Not 833 Satisfiable)</a> response instead of a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response for an unsatisfiable <a href="#header.range" class="smpl">Range</a> header field, since not all servers implement this header field. 834 </p> 835 </div> 813 <p id="rfc.section.4.1.p.9">If a 206 is generated in response to a request with an <a href="#header.if-range" class="smpl">If-Range</a> header field, the sender <em class="bcp14">SHOULD NOT</em> generate other representation header fields beyond those described above. Otherwise, the sender <em class="bcp14">MUST</em> generate all of the same representation header fields that would have been sent in a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response to the same request. 814 </p> 815 <p id="rfc.section.4.1.p.10">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 206 responses. 816 </p> 836 817 <div id="rfc.iref.c.1"></div> 837 <h2 id="rfc.section.4. 4"><a href="#rfc.section.4.4">4.4</a> <a id="header.content-range" href="#header.content-range">Content-Range</a></h2>838 <p id="rfc.section.4. 4.p.1">The "Content-Range" header field is sent with a partial representation to specify what range of the full representation is818 <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a> <a id="header.content-range" href="#header.content-range">Content-Range</a></h2> 819 <p id="rfc.section.4.2.p.1">The "Content-Range" header field is sent with a partial representation to specify what range of the full representation is 839 820 enclosed as payload. 840 821 </p> 841 <div id="rfc.figure.u.1 9"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span><span id="rfc.iref.g.20"></span><span id="rfc.iref.g.21"></span><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span> <a href="#header.content-range" class="smpl">Content-Range</a> = <a href="#header.content-range" class="smpl">byte-content-range</a>822 <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span><span id="rfc.iref.g.20"></span><span id="rfc.iref.g.21"></span><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span> <a href="#header.content-range" class="smpl">Content-Range</a> = <a href="#header.content-range" class="smpl">byte-content-range</a> 842 823 / <a href="#header.content-range" class="smpl">other-content-range</a> 843 824 … … 853 834 <a href="#header.content-range" class="smpl">other-content-range</a> = <a href="#range.units.other" class="smpl">other-range-unit</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#header.content-range" class="smpl">other-range-resp</a> 854 835 <a href="#header.content-range" class="smpl">other-range-resp</a> = *<a href="#imported.abnf" class="smpl">CHAR</a> 855 </pre><p id="rfc.section.4. 4.p.3">Range units are defined in <a href="#range.units" title="Range Units">Section 2</a>. A recipient of a <a href="#status.206" class="smpl">206 (Partial Content)</a> response containing a <a href="#header.content-range" class="smpl">Content-Range</a> header field with a <a href="#range.units" class="smpl">range unit</a> that the recipient does not understand <em class="bcp14">MUST NOT</em> attempt to recombine it with a stored representation. A proxy that receives such a message <em class="bcp14">SHOULD</em> forward it downstream.856 </p> 857 <p id="rfc.section.4. 4.p.4">For byte ranges, a sender <em class="bcp14">SHOULD</em> indicate the complete length of the representation from which the range has been extracted unless the complete length is unknown836 </pre><p id="rfc.section.4.2.p.3">Range units are defined in <a href="#range.units" title="Range Units">Section 2</a>. A recipient of a <a href="#status.206" class="smpl">206 (Partial Content)</a> response containing a <a href="#header.content-range" class="smpl">Content-Range</a> header field with a <a href="#range.units" class="smpl">range unit</a> that the recipient does not understand <em class="bcp14">MUST NOT</em> attempt to recombine it with a stored representation. A proxy that receives such a message <em class="bcp14">SHOULD</em> forward it downstream. 837 </p> 838 <p id="rfc.section.4.2.p.4">For byte ranges, a sender <em class="bcp14">SHOULD</em> indicate the complete length of the representation from which the range has been extracted unless the complete length is unknown 858 839 or difficult to determine. An asterisk character ("*") in place of the complete-length indicates that the representation length 859 840 was unknown when the header field was generated. 860 841 </p> 861 <p id="rfc.section.4. 4.p.5">A Content-Range field value with a <a href="#header.content-range" class="smpl">byte-range-resp</a> that has a <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> value less than its <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> value, or a <a href="#header.content-range" class="smpl">complete-length</a> value less than or equal to its <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> value, is invalid. The recipient of an invalid <a href="#header.content-range" class="smpl">Content-Range</a> <em class="bcp14">MUST NOT</em> attempt to recombine the received content with a stored representation.862 </p> 863 <p id="rfc.section.4. 4.p.6">A server generating a <a href="#status.206" class="smpl">206 (Partial Content)</a> response to a byte range request <em class="bcp14">MUST</em> send, in each body-part of a multipart response or in the header block of a single part response, a Content-Range header field842 <p id="rfc.section.4.2.p.5">A Content-Range field value with a <a href="#header.content-range" class="smpl">byte-range-resp</a> that has a <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> value less than its <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> value, or a <a href="#header.content-range" class="smpl">complete-length</a> value less than or equal to its <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> value, is invalid. The recipient of an invalid <a href="#header.content-range" class="smpl">Content-Range</a> <em class="bcp14">MUST NOT</em> attempt to recombine the received content with a stored representation. 843 </p> 844 <p id="rfc.section.4.2.p.6">A server generating a <a href="#status.206" class="smpl">206 (Partial Content)</a> response to a byte range request <em class="bcp14">MUST</em> send, in each body-part of a multipart response or in the header block of a single part response, a Content-Range header field 864 845 containing a <a href="#header.content-range" class="smpl">byte-range-resp</a> value that reflects the corresponding range being sent. The following example would apply when the complete length of the 865 846 selected representation is known by the sender to be 1234 bytes: 866 847 </p> 867 <div id="rfc.figure.u. 20"></div><pre class="text"> Content-Range: bytes 42-1233/1234868 </pre><p id="rfc.section.4. 4.p.8">or this second example would apply when the complete length is unknown:</p>869 <div id="rfc.figure.u.2 1"></div><pre class="text"> Content-Range: bytes 42-1233/*870 </pre><p id="rfc.section.4. 4.p.10">A server generating a <a href="#status.416" class="smpl">416 (Range Not Satisfiable)</a> response to a byte range request <em class="bcp14">SHOULD</em> send a Content-Range header field with an <a href="#header.content-range" class="smpl">unsatisfied-range</a> value, as in the following example:871 </p> 872 <div id="rfc.figure.u.2 2"></div><pre class="text"> Content-Range: bytes */1234873 </pre><p id="rfc.section.4. 4.p.12">The complete-length in a 416 response indicates the current length of the selected representation, which will be known by848 <div id="rfc.figure.u.19"></div><pre class="text"> Content-Range: bytes 42-1233/1234 849 </pre><p id="rfc.section.4.2.p.8">or this second example would apply when the complete length is unknown:</p> 850 <div id="rfc.figure.u.20"></div><pre class="text"> Content-Range: bytes 42-1233/* 851 </pre><p id="rfc.section.4.2.p.10">A server generating a <a href="#status.416" class="smpl">416 (Range Not Satisfiable)</a> response to a byte range request <em class="bcp14">SHOULD</em> send a Content-Range header field with an <a href="#header.content-range" class="smpl">unsatisfied-range</a> value, as in the following example: 852 </p> 853 <div id="rfc.figure.u.21"></div><pre class="text"> Content-Range: bytes */1234 854 </pre><p id="rfc.section.4.2.p.12">The complete-length in a 416 response indicates the current length of the selected representation, which will be known by 874 855 the server generating the response because that is how it determined the range to be unsatisfiable. 875 856 </p> 876 <p id="rfc.section.4. 4.p.13">The "Content-Range" header field has no meaning for status codes that do not explicitly describe its semantic. For this specification,857 <p id="rfc.section.4.2.p.13">The "Content-Range" header field has no meaning for status codes that do not explicitly describe its semantic. For this specification, 877 858 only the <a href="#status.206" class="smpl">206 (Partial Content)</a> and <a href="#status.416" class="smpl">416 (Range Not Satisfiable)</a> status codes describe a meaning for Content-Range. 878 859 </p> 879 <p id="rfc.section.4. 4.p.14">More examples of Content-Range values, assuming that the representation contains a total of 1234 bytes: </p>860 <p id="rfc.section.4.2.p.14">More examples of Content-Range values, assuming that the representation contains a total of 1234 bytes: </p> 880 861 <ul> 881 862 <li>The first 500 bytes: 882 <div id="rfc.figure.u.2 3"></div><pre class="text"> Content-Range: bytes 0-499/1234863 <div id="rfc.figure.u.22"></div><pre class="text"> Content-Range: bytes 0-499/1234 883 864 </pre> </li> 884 865 <li>The second 500 bytes: 885 <div id="rfc.figure.u.2 4"></div><pre class="text"> Content-Range: bytes 500-999/1234866 <div id="rfc.figure.u.23"></div><pre class="text"> Content-Range: bytes 500-999/1234 886 867 </pre> </li> 887 868 <li>All except for the first 500 bytes: 888 <div id="rfc.figure.u.2 5"></div><pre class="text"> Content-Range: bytes 500-1233/1234869 <div id="rfc.figure.u.24"></div><pre class="text"> Content-Range: bytes 500-1233/1234 889 870 </pre> </li> 890 871 <li>The last 500 bytes: 891 <div id="rfc.figure.u.2 6"></div><pre class="text"> Content-Range: bytes 734-1233/1234872 <div id="rfc.figure.u.25"></div><pre class="text"> Content-Range: bytes 734-1233/1234 892 873 </pre> </li> 893 874 </ul> 894 <h2 id="rfc.section.4. 5"><a href="#rfc.section.4.5">4.5</a> <a id="combining.byte.ranges" href="#combining.byte.ranges">Combining Ranges</a></h2>895 <p id="rfc.section.4. 5.p.1">A response might transfer only a subrange of a representation if the connection closed prematurely or if the request used875 <h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a> <a id="combining.byte.ranges" href="#combining.byte.ranges">Combining Ranges</a></h2> 876 <p id="rfc.section.4.3.p.1">A response might transfer only a subrange of a representation if the connection closed prematurely or if the request used 896 877 one or more Range specifications. After several such transfers, a client might have received several ranges of the same representation. 897 878 These ranges can only be safely combined if they all have in common the same strong validator, where "strong validator" is 898 879 defined to be either an entity-tag that is not marked as weak (<a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a> of <a href="#Part4" id="rfc.xref.Part4.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>) or, if no entity-tag is provided, a <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> value that is strong in the sense defined by <a href="p4-conditional.html#lastmod.comparison" title="Comparison">Section 2.2.2</a> of <a href="#Part4" id="rfc.xref.Part4.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>. 899 880 </p> 900 <p id="rfc.section.4. 5.p.2">When a client receives an incomplete <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response or a <a href="#status.206" class="smpl">206 (Partial Content)</a> response, and already has one or more partial responses for the same method and effective request URI that have the same strong881 <p id="rfc.section.4.3.p.2">When a client receives an incomplete <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response or a <a href="#status.206" class="smpl">206 (Partial Content)</a> response, and already has one or more partial responses for the same method and effective request URI that have the same strong 901 882 validator as present in the new response, the recipient <em class="bcp14">MAY</em> combine some or all of those responses into a set of continuous ranges. A client <em class="bcp14">MUST NOT</em> combine responses that differ in the strong validator or that do not have a strong validator. 902 883 </p> 903 <p id="rfc.section.4. 5.p.3">If the new response is an incomplete <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response, then the header fields of that new response are used for any combined response and replace those of the matching884 <p id="rfc.section.4.3.p.3">If the new response is an incomplete <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response, then the header fields of that new response are used for any combined response and replace those of the matching 904 885 stored responses. 905 886 </p> 906 <p id="rfc.section.4. 5.p.4">If the new response is a <a href="#status.206" class="smpl">206 (Partial Content)</a> response and at least one of the matching stored responses is a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a>, then the combined response header fields consist of the most recent 200 response's header fields. If all of the matching887 <p id="rfc.section.4.3.p.4">If the new response is a <a href="#status.206" class="smpl">206 (Partial Content)</a> response and at least one of the matching stored responses is a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a>, then the combined response header fields consist of the most recent 200 response's header fields. If all of the matching 907 888 stored responses are 206 responses, then the stored response with the most recent header fields is used as the source of header 908 889 fields for the combined response, except that the client <em class="bcp14">MUST</em> use other header fields provided in the new response, aside from <a href="#header.content-range" class="smpl">Content-Range</a>, to replace all instances of the corresponding header fields in the stored response. 909 890 </p> 910 <p id="rfc.section.4. 5.p.5">The combined response message body consists of the union of partial content ranges in the new response and each of the selected891 <p id="rfc.section.4.3.p.5">The combined response message body consists of the union of partial content ranges in the new response and each of the selected 911 892 responses. If the union consists of the entire range of the representation, then the client <em class="bcp14">MUST</em> record the combined response as if it were a complete <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response, including a <a href="p1-messaging.html#header.content-length" class="smpl">Content-Length</a> header field that reflects the complete length. Otherwise, the client <em class="bcp14">MUST</em> record the set of continuous ranges as one of the following: an incomplete <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response if the combined response is a prefix of the representation, a single <a href="#status.206" class="smpl">206 (Partial Content)</a> response containing a multipart/byteranges body, or multiple <a href="#status.206" class="smpl">206 (Partial Content)</a> responses, each with one continuous range that is indicated by a <a href="#header.content-range" class="smpl">Content-Range</a> header field. 912 893 </p> 894 <div id="rfc.iref.29"></div> 895 <h2 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4</a> <a id="status.416" href="#status.416">416 Range Not Satisfiable</a></h2> 896 <p id="rfc.section.4.4.p.1">The <dfn>416 (Range Not Satisfiable)</dfn> status code indicates that none of the ranges-specifier values in the request's <a href="#header.range" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.3" title="Range">Section 3.1</a>) overlap the current extent of the selected resource and the request did not include an <a href="#header.if-range" class="smpl">If-Range</a> header field (<a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section 3.2</a>). (For byte-ranges, this means that the first-byte-pos of all of the byte-range-spec values were greater than the current 897 length of the selected representation.) 898 </p> 899 <p id="rfc.section.4.4.p.2">When this status code is sent in response to a byte-range request, the sender <em class="bcp14">SHOULD</em> generate a <a href="#header.content-range" class="smpl">Content-Range</a> header field specifying the current length of the selected representation (see <a href="#header.content-range" id="rfc.xref.header.content-range.3" title="Content-Range">Section 4.2</a>). 900 </p> 901 <div id="rfc.figure.u.26"></div> 902 <p>For example:</p> <pre class="text">HTTP/1.1 416 Range Not Satisfiable 903 Date: Mon, 20 Jan 2012 15:41:54 GMT 904 Content-Range: bytes */47022 905 Content-Type: image/gif 906 </pre><div class="note" id="rfc.section.4.4.p.4"> 907 <p> <b>Note:</b> Clients cannot depend on servers to send a <a href="#status.416" class="smpl">416 (Range Not 908 Satisfiable)</a> response instead of a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response for an unsatisfiable <a href="#header.range" class="smpl">Range</a> header field, since not all servers implement this header field. 909 </p> 910 </div> 913 911 <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a id="IANA.considerations" href="#IANA.considerations">IANA Considerations</a></h1> 914 912 <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a> <a id="range.unit.registry" href="#range.unit.registry">Range Unit Registry</a></h2> … … 970 968 <td class="left">206</td> 971 969 <td class="left">Partial Content</td> 972 <td class="left"> <a href="#status.206" id="rfc.xref.status.206.1" title="206 Partial Content">Section 4. 2</a>970 <td class="left"> <a href="#status.206" id="rfc.xref.status.206.1" title="206 Partial Content">Section 4.1</a> 973 971 </td> 974 972 </tr> … … 976 974 <td class="left">416</td> 977 975 <td class="left">Range Not Satisfiable</td> 978 <td class="left"> <a href="#status.416" id="rfc.xref.status.416.1" title="416 Range Not Satisfiable">Section 4. 3</a>976 <td class="left"> <a href="#status.416" id="rfc.xref.status.416.1" title="416 Range Not Satisfiable">Section 4.4</a> 979 977 </td> 980 978 </tr> … … 1008 1006 <td class="left">http</td> 1009 1007 <td class="left">standard</td> 1010 <td class="left"> <a href="#header.content-range" id="rfc.xref.header.content-range.4" title="Content-Range">Section 4. 4</a>1008 <td class="left"> <a href="#header.content-range" id="rfc.xref.header.content-range.4" title="Content-Range">Section 4.2</a> 1011 1009 </td> 1012 1010 </tr> … … 1216 1214 </ol> 1217 1215 <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a> <a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFC 2616</a></h1> 1218 <p id="rfc.section.B.p.1">A weak validator cannot be used in a <a href="#status.206" class="smpl">206</a> response. (<a href="#status.206" id="rfc.xref.status.206.2" title="206 Partial Content">Section 4. 2</a>)1219 </p> 1220 <p id="rfc.section.B.p.2">The Content-Range header field only has meaning when the status code explicitly defines its use. (<a href="#header.content-range" id="rfc.xref.header.content-range.5" title="Content-Range">Section 4. 4</a>)1216 <p id="rfc.section.B.p.1">A weak validator cannot be used in a <a href="#status.206" class="smpl">206</a> response. (<a href="#status.206" id="rfc.xref.status.206.2" title="206 Partial Content">Section 4.1</a>) 1217 </p> 1218 <p id="rfc.section.B.p.2">The Content-Range header field only has meaning when the status code explicitly defines its use. (<a href="#header.content-range" id="rfc.xref.header.content-range.5" title="Content-Range">Section 4.2</a>) 1221 1219 </p> 1222 1220 <p id="rfc.section.B.p.3">Servers are given more leeway in how they respond to a range request, in order to mitigate abuse by malicious (or just greedy) … … 1320 1318 <ul class="ind"> 1321 1319 <li><a id="rfc.index.2" href="#rfc.index.2"><b>2</b></a><ul> 1322 <li>206 Partial Content (status code) <a href="#rfc.iref.20"><b>4. 2</b></a>, <a href="#rfc.xref.status.206.1">5.2</a>, <a href="#rfc.xref.status.206.2">B</a></li>1320 <li>206 Partial Content (status code) <a href="#rfc.iref.20"><b>4.1</b></a>, <a href="#rfc.xref.status.206.1">5.2</a>, <a href="#rfc.xref.status.206.2">B</a></li> 1323 1321 </ul> 1324 1322 </li> 1325 1323 <li><a id="rfc.index.4" href="#rfc.index.4"><b>4</b></a><ul> 1326 <li>416 Range Not Satisfiable (status code) <a href="#rfc.iref.2 0"><b>4.3</b></a>, <a href="#rfc.xref.status.416.1">5.2</a></li>1324 <li>416 Range Not Satisfiable (status code) <a href="#rfc.iref.29"><b>4.4</b></a>, <a href="#rfc.xref.status.416.1">5.2</a></li> 1327 1325 </ul> 1328 1326 </li> … … 1337 1335 </li> 1338 1336 <li><a id="rfc.index.C" href="#rfc.index.C"><b>C</b></a><ul> 1339 <li>Content-Range header field <a href="#rfc.xref.header.content-range.1">2</a>, <a href="#rfc.xref.header.content-range.2">4. 2</a>, <a href="#rfc.xref.header.content-range.3">4.3</a>, <a href="#rfc.iref.c.1"><b>4.4</b></a>, <a href="#rfc.xref.header.content-range.4">5.3</a>, <a href="#rfc.xref.header.content-range.5">B</a></li>1337 <li>Content-Range header field <a href="#rfc.xref.header.content-range.1">2</a>, <a href="#rfc.xref.header.content-range.2">4.1</a>, <a href="#rfc.iref.c.1"><b>4.2</b></a>, <a href="#rfc.xref.header.content-range.3">4.4</a>, <a href="#rfc.xref.header.content-range.4">5.3</a>, <a href="#rfc.xref.header.content-range.5">B</a></li> 1340 1338 </ul> 1341 1339 </li> … … 1345 1343 <li><tt>Accept-Ranges</tt> <a href="#rfc.iref.g.14"><b>2.3</b></a></li> 1346 1344 <li><tt>acceptable-ranges</tt> <a href="#rfc.iref.g.15"><b>2.3</b></a></li> 1347 <li><tt>byte-content-range</tt> <a href="#rfc.iref.g.19"><b>4. 4</b></a></li>1348 <li><tt>byte-range</tt> <a href="#rfc.iref.g.21"><b>4. 4</b></a></li>1349 <li><tt>byte-range-resp</tt> <a href="#rfc.iref.g.20"><b>4. 4</b></a></li>1345 <li><tt>byte-content-range</tt> <a href="#rfc.iref.g.19"><b>4.2</b></a></li> 1346 <li><tt>byte-range</tt> <a href="#rfc.iref.g.21"><b>4.2</b></a></li> 1347 <li><tt>byte-range-resp</tt> <a href="#rfc.iref.g.20"><b>4.2</b></a></li> 1350 1348 <li><tt>byte-range-set</tt> <a href="#rfc.iref.g.7"><b>2.1</b></a></li> 1351 1349 <li><tt>byte-range-spec</tt> <a href="#rfc.iref.g.8"><b>2.1</b></a></li> 1352 1350 <li><tt>byte-ranges-specifier</tt> <a href="#rfc.iref.g.6"><b>2.1</b></a></li> 1353 1351 <li><tt>bytes-unit</tt> <a href="#rfc.iref.g.2">2</a>, <a href="#rfc.iref.g.4"><b>2.1</b></a></li> 1354 <li><tt>complete-length</tt> <a href="#rfc.iref.g.25"><b>4. 4</b></a></li>1355 <li><tt>Content-Range</tt> <a href="#rfc.iref.g.18"><b>4. 4</b></a></li>1352 <li><tt>complete-length</tt> <a href="#rfc.iref.g.25"><b>4.2</b></a></li> 1353 <li><tt>Content-Range</tt> <a href="#rfc.iref.g.18"><b>4.2</b></a></li> 1356 1354 <li><tt>first-byte-pos</tt> <a href="#rfc.iref.g.9"><b>2.1</b></a></li> 1357 1355 <li><tt>If-Range</tt> <a href="#rfc.iref.g.17"><b>3.2</b></a></li> 1358 1356 <li><tt>last-byte-pos</tt> <a href="#rfc.iref.g.10"><b>2.1</b></a></li> 1359 <li><tt>other-content-range</tt> <a href="#rfc.iref.g.23"><b>4. 4</b></a></li>1360 <li><tt>other-range-resp</tt> <a href="#rfc.iref.g.24"><b>4. 4</b></a></li>1357 <li><tt>other-content-range</tt> <a href="#rfc.iref.g.23"><b>4.2</b></a></li> 1358 <li><tt>other-range-resp</tt> <a href="#rfc.iref.g.24"><b>4.2</b></a></li> 1361 1359 <li><tt>other-range-unit</tt> <a href="#rfc.iref.g.3">2</a>, <a href="#rfc.iref.g.13"><b>2.2</b></a></li> 1362 1360 <li><tt>Range</tt> <a href="#rfc.iref.g.16"><b>3.1</b></a></li> … … 1365 1363 <li><tt>suffix-byte-range-spec</tt> <a href="#rfc.iref.g.11"><b>2.1</b></a></li> 1366 1364 <li><tt>suffix-length</tt> <a href="#rfc.iref.g.12"><b>2.1</b></a></li> 1367 <li><tt>unsatisfied-range</tt> <a href="#rfc.iref.g.22"><b>4. 4</b></a></li>1365 <li><tt>unsatisfied-range</tt> <a href="#rfc.iref.g.22"><b>4.2</b></a></li> 1368 1366 </ul> 1369 1367 </li> … … 1371 1369 </li> 1372 1370 <li><a id="rfc.index.I" href="#rfc.index.I"><b>I</b></a><ul> 1373 <li>If-Range header field <a href="#rfc.xref.header.if-range.1">3.1</a>, <a href="#rfc.iref.i.1"><b>3.2</b></a>, <a href="#rfc.xref.header.if-range.2">4. 2</a>, <a href="#rfc.xref.header.if-range.3">4.3</a>, <a href="#rfc.xref.header.if-range.4">5.3</a></li>1371 <li>If-Range header field <a href="#rfc.xref.header.if-range.1">3.1</a>, <a href="#rfc.iref.i.1"><b>3.2</b></a>, <a href="#rfc.xref.header.if-range.2">4.1</a>, <a href="#rfc.xref.header.if-range.3">4.4</a>, <a href="#rfc.xref.header.if-range.4">5.3</a></li> 1374 1372 </ul> 1375 1373 </li> … … 1399 1397 </ul> 1400 1398 </li> 1401 <li><em>Part4</em> <a href="#rfc.xref.Part4.1">3.1</a>, <a href="#rfc.xref.Part4.2">3.2</a>, <a href="#rfc.xref.Part4.3">3.2</a>, <a href="#rfc.xref.Part4.4">4. 5</a>, <a href="#rfc.xref.Part4.5">4.5</a>, <a href="#Part4"><b>8.1</b></a>, <a href="#rfc.xref.Part4.6">C</a><ul>1402 <li><em>Section 2.2.2</em> <a href="#rfc.xref.Part4.2">3.2</a>, <a href="#rfc.xref.Part4.3">3.2</a>, <a href="#rfc.xref.Part4.5">4. 5</a></li>1403 <li><em>Section 2.3</em> <a href="#rfc.xref.Part4.4">4. 5</a>, <a href="#rfc.xref.Part4.6">C</a></li>1399 <li><em>Part4</em> <a href="#rfc.xref.Part4.1">3.1</a>, <a href="#rfc.xref.Part4.2">3.2</a>, <a href="#rfc.xref.Part4.3">3.2</a>, <a href="#rfc.xref.Part4.4">4.3</a>, <a href="#rfc.xref.Part4.5">4.3</a>, <a href="#Part4"><b>8.1</b></a>, <a href="#rfc.xref.Part4.6">C</a><ul> 1400 <li><em>Section 2.2.2</em> <a href="#rfc.xref.Part4.2">3.2</a>, <a href="#rfc.xref.Part4.3">3.2</a>, <a href="#rfc.xref.Part4.5">4.3</a></li> 1401 <li><em>Section 2.3</em> <a href="#rfc.xref.Part4.4">4.3</a>, <a href="#rfc.xref.Part4.6">C</a></li> 1404 1402 </ul> 1405 1403 </li> 1406 <li><em>Part6</em> <a href="#rfc.xref.Part6.1">4. 2</a>, <a href="#Part6"><b>8.1</b></a><ul>1407 <li><em>Section 4.1.2</em> <a href="#rfc.xref.Part6.1">4. 2</a></li>1404 <li><em>Part6</em> <a href="#rfc.xref.Part6.1">4.1</a>, <a href="#Part6"><b>8.1</b></a><ul> 1405 <li><em>Section 4.1.2</em> <a href="#rfc.xref.Part6.1">4.1</a></li> 1408 1406 </ul> 1409 1407 </li> … … 1411 1409 </li> 1412 1410 <li><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul> 1413 <li>Range header field <a href="#rfc.xref.header.range.1">2</a>, <a href="#rfc.iref.r.1"><b>3.1</b></a>, <a href="#rfc.xref.header.range.2">4. 2</a>, <a href="#rfc.xref.header.range.3">4.3</a>, <a href="#rfc.xref.header.range.4">5.3</a></li>1411 <li>Range header field <a href="#rfc.xref.header.range.1">2</a>, <a href="#rfc.iref.r.1"><b>3.1</b></a>, <a href="#rfc.xref.header.range.2">4.1</a>, <a href="#rfc.xref.header.range.3">4.4</a>, <a href="#rfc.xref.header.range.4">5.3</a></li> 1414 1412 <li><em>RFC2046</em> <a href="#RFC2046"><b>8.1</b></a>, <a href="#rfc.xref.RFC2046.1">A</a>, <a href="#rfc.xref.RFC2046.2">A</a><ul> 1415 1413 <li><em>Section 5.1</em> <a href="#rfc.xref.RFC2046.1">A</a></li> -
draft-ietf-httpbis/latest/p5-range.xml
r2151 r2152 480 480 481 481 <section title="Responses to a Range Request" anchor="range.response"> 482 <section title="Response to a Single and Multiple Ranges Request"> 482 483 <section title="206 Partial Content" anchor="status.206"> 484 <iref primary="true" item="206 Partial Content (status code)" x:for-anchor=""/> 485 <x:anchor-alias value="206"/> 486 <x:anchor-alias value="206 (Partial Content)"/> 487 <t> 488 The <x:dfn>206 (Partial Content)</x:dfn> status code indicates that the 489 server has fulfilled the partial GET request for the resource. 490 The request &MUST; have included a <x:ref>Range</x:ref> header field 491 (<xref target="header.range"/>) indicating the desired range, and &MAY; have 492 included an <x:ref>If-Range</x:ref> header field 493 (<xref target="header.if-range"/>) to make the request conditional. 494 </t> 483 495 <t> 484 496 When an HTTP message includes the content of a single range (for … … 521 533 request. 522 534 </t> 523 </section>524 525 <section title="206 Partial Content" anchor="status.206">526 <iref primary="true" item="206 Partial Content (status code)" x:for-anchor=""/>527 <x:anchor-alias value="206"/>528 <x:anchor-alias value="206 (Partial Content)"/>529 <t>530 The <x:dfn>206 (Partial Content)</x:dfn> status code indicates that the531 server has fulfilled the partial GET request for the resource.532 The request &MUST; have included a <x:ref>Range</x:ref> header field533 (<xref target="header.range"/>) indicating the desired range, and &MAY; have534 included an <x:ref>If-Range</x:ref> header field535 (<xref target="header.if-range"/>) to make the request conditional.536 </t>537 535 <t> 538 536 When a 206 response is generated, the sender &MUST; generate the following … … 541 539 <t> 542 540 Either a <x:ref>Content-Range</x:ref> header field 543 (<xref target="header.content-range"/>) indicating 544 the range included with this response, or a multipart/byteranges 545 <x:ref>Content-Type</x:ref> including Content-Range fields for each 546 part. If a <x:ref>Content-Length</x:ref> header field is present in the 547 response, its value &MUST; match the actual number of octets 548 transmitted in the message body. 541 (<xref target="header.content-range"/>) indicating the single range 542 included with this response, or a multipart/byteranges 543 <x:ref>Content-Type</x:ref> indicating that multiple ranges are 544 enclosed as multipart body-parts. 549 545 </t> 550 546 <t> 551 Date547 <x:ref>Date</x:ref> 552 548 </t> 553 549 <t> … … 571 567 freshness for 206 responses. 572 568 </t> 573 </section>574 575 <section title="416 Range Not Satisfiable" anchor="status.416">576 <iref primary="true" item="416 Range Not Satisfiable (status code)" x:for-anchor=""/>577 <x:anchor-alias value="416 (Range Not Satisfiable)"/>578 <t>579 The <x:dfn>416 (Range Not Satisfiable)</x:dfn> status code580 indicates that none of the ranges-specifier values in the request's581 <x:ref>Range</x:ref> header field (<xref target="header.range"/>)582 overlap the current583 extent of the selected resource and the request did not include an584 <x:ref>If-Range</x:ref> header field (<xref target="header.if-range"/>).585 (For byte-ranges, this means that the first-byte-pos of all of the586 byte-range-spec values were greater than the current length of the selected587 representation.)588 </t>589 <t>590 When this status code is sent in response to a byte-range request, the591 sender &SHOULD; generate a <x:ref>Content-Range</x:ref> header field592 specifying the current length of the selected representation593 (see <xref target="header.content-range"/>).594 </t>595 <figure>596 <preamble>For example:</preamble>597 <artwork type="message/http; msgtype="response"" x:indent-with=" ">598 HTTP/1.1 416 Range Not Satisfiable599 Date: Mon, 20 Jan 2012 15:41:54 GMT600 Content-Range: bytes */47022601 Content-Type: image/gif602 </artwork></figure>603 <x:note>604 <t>605 &Note; Clients cannot depend on servers to send a <x:ref>416 (Range Not606 Satisfiable)</x:ref> response instead of a <x:ref>200 (OK)</x:ref>607 response for an unsatisfiable <x:ref>Range</x:ref> header field, since not608 all servers implement this header field.609 </t>610 </x:note>611 569 </section> 612 570 … … 788 746 field. 789 747 </t> 748 </section> 749 750 <section title="416 Range Not Satisfiable" anchor="status.416"> 751 <iref primary="true" item="416 Range Not Satisfiable (status code)" x:for-anchor=""/> 752 <x:anchor-alias value="416 (Range Not Satisfiable)"/> 753 <t> 754 The <x:dfn>416 (Range Not Satisfiable)</x:dfn> status code 755 indicates that none of the ranges-specifier values in the request's 756 <x:ref>Range</x:ref> header field (<xref target="header.range"/>) 757 overlap the current 758 extent of the selected resource and the request did not include an 759 <x:ref>If-Range</x:ref> header field (<xref target="header.if-range"/>). 760 (For byte-ranges, this means that the first-byte-pos of all of the 761 byte-range-spec values were greater than the current length of the selected 762 representation.) 763 </t> 764 <t> 765 When this status code is sent in response to a byte-range request, the 766 sender &SHOULD; generate a <x:ref>Content-Range</x:ref> header field 767 specifying the current length of the selected representation 768 (see <xref target="header.content-range"/>). 769 </t> 770 <figure> 771 <preamble>For example:</preamble> 772 <artwork type="message/http; msgtype="response"" x:indent-with=" "> 773 HTTP/1.1 416 Range Not Satisfiable 774 Date: Mon, 20 Jan 2012 15:41:54 GMT 775 Content-Range: bytes */47022 776 Content-Type: image/gif 777 </artwork></figure> 778 <x:note> 779 <t> 780 &Note; Clients cannot depend on servers to send a <x:ref>416 (Range Not 781 Satisfiable)</x:ref> response instead of a <x:ref>200 (OK)</x:ref> 782 response for an unsatisfiable <x:ref>Range</x:ref> header field, since not 783 all servers implement this header field. 784 </t> 785 </x:note> 790 786 </section> 791 787 </section> … … 978 974 <x:defines>Content-Location</x:defines> 979 975 <x:defines>Content-Type</x:defines> 976 <x:defines>Date</x:defines> 980 977 <x:defines>Location</x:defines> 981 978 <x:defines>Vary</x:defines>
Note: See TracChangeset
for help on using the changeset viewer.