Changeset 2144 for draft-ietf-httpbis/latest
- Timestamp:
- 20/01/13 16:15:04 (10 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p5-range.html
r2143 r2144 628 628 </ul> 629 629 <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> <a id="introduction" href="#introduction">Introduction</a></h1> 630 <p id="rfc.section.1.p.1">H TTP clients often encounter interrupted data transfers as a result of canceled requests or dropped connections. When a client631 has stored a partial representation, it is desirable to request the remainder of that representation in a subsequent request632 rather than transfer the entire representation. There are also a number of Web applications that benefit from being able to633 request only a subset of a larger representation, such as a single page of a very large document or only part of an image634 to be rendered by a device with limited local storage.635 </p> 636 <p id="rfc.section.1.p.2">This document defines HTTP/1.1 range requests, partial responses, and the multipart/byteranges media type . The protocol for637 range requests is an <em class="bcp14">OPTIONAL</em> feature of HTTP, designed so resources or recipients that do not implement this feature can respond as if it is a normal GET638 request without impacting interoperability. Partial responses are indicated by a distinct status code to not be mistaken for639 full responses by intermediatecaches that might not implement the feature.640 </p> 641 <p id="rfc.section.1.p.3">Although the HTTP range request mechanism is designed to allow for extensible range types, this specification only defines642 requestsfor byte ranges.630 <p id="rfc.section.1.p.1">Hypertext Transfer Protocol (HTTP) clients often encounter interrupted data transfers as a result of canceled requests or 631 dropped connections. When a client has stored a partial representation, it is desirable to request the remainder of that representation 632 in a subsequent request rather than transfer the entire representation. Likewise, devices with limited local storage might 633 benefit from being able to request only a subset of a larger representation, such as a single page of a very large document, 634 or the dimensions of an embedded image. 635 </p> 636 <p id="rfc.section.1.p.2">This document defines HTTP/1.1 range requests, partial responses, and the multipart/byteranges media type, obsoleting those 637 parts previously defined in <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>. Range requests are an <em class="bcp14">OPTIONAL</em> feature of HTTP, designed so that recipients not implementing this feature (or not supporting it for the target resource) 638 can respond as if it is a normal GET request without impacting interoperability. Partial responses are indicated by a distinct 639 status code to not be mistaken for full responses by caches that might not implement the feature. 640 </p> 641 <p id="rfc.section.1.p.3">Although the range request mechanism is designed to allow for extensible range types, this specification only defines requests 642 for byte ranges. 643 643 </p> 644 644 <h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a> <a id="conformance" href="#conformance">Conformance and Error Handling</a></h2> … … 653 653 <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a> <a id="range.units" href="#range.units">Range Units</a></h1> 654 654 <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. Such a <dfn>range unit</dfn> can be used in 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>) and <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>) header fields to delineate the parts of a representation that are either requested or transferred, respectively. 656 </p> 657 <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="#range.units" class="smpl">bytes-unit</a> / <a href="#range.units" class="smpl">other-range-unit</a> 658 <a href="#range.units" class="smpl">bytes-unit</a> = "bytes" 659 <a href="#range.units" class="smpl">other-range-unit</a> = <a href="#imported.abnf" class="smpl">token</a> 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. 656 </p> 657 <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> 660 658 </pre><h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a> <a id="byte.ranges" href="#byte.ranges">Byte Ranges</a></h2> 661 <p id="rfc.section.2.1.p.1">Since all HTTP representations are transferred as sequences of bytes, the concept of a byte range is meaningful for any HTTP 662 representation. (However, not all clients and servers need to support byte-range operations.) 663 </p> 664 <p id="rfc.section.2.1.p.2">Byte range specifications in HTTP apply to the sequence of bytes in the representation data (not necessarily the same as the 665 message body). 666 </p> 667 <div id="rule.ranges-specifier"> 659 <p id="rfc.section.2.1.p.1">Since representation data is transferred in payloads as a sequence of octets, a byte range is a meaningful substructure for 660 any representation transferable over HTTP (<a href="p2-semantics.html#representations" title="Representations">Section 3</a> of <a href="#Part2" id="rfc.xref.Part2.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[Part2]</cite></a>). We define the "bytes" range unit for expressing subranges of the data's octet sequence. 661 </p> 662 <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.4"></span> <a href="#byte.ranges" class="smpl">bytes-unit</a> = "bytes" 663 </pre><div id="rule.ranges-specifier"> 668 664 <p id="rfc.section.2.1.p.3"> A byte range operation <em class="bcp14">MAY</em> specify a single range of bytes, or a set of ranges within a single representation. 669 665 </p> 670 666 </div> 671 <div id="rfc.figure.u. 2"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span><span id="rfc.iref.g.6"></span><span id="rfc.iref.g.7"></span><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span> <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> = <a href="#range.units" class="smpl">bytes-unit</a> "=" <a href="#rule.ranges-specifier" class="smpl">byte-range-set</a>667 <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.5"></span><span id="rfc.iref.g.6"></span><span id="rfc.iref.g.7"></span><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span><span id="rfc.iref.g.10"></span> <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> = <a href="#byte.ranges" class="smpl">bytes-unit</a> "=" <a href="#rule.ranges-specifier" class="smpl">byte-range-set</a> 672 668 <a href="#rule.ranges-specifier" class="smpl">byte-range-set</a> = 1#( <a href="#rule.ranges-specifier" class="smpl">byte-range-spec</a> / <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> ) 673 669 <a href="#rule.ranges-specifier" class="smpl">byte-range-spec</a> = <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> "-" [ <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> ] … … 685 681 </p> 686 682 <p id="rfc.section.2.1.p.8">By its choice of last-byte-pos, a client can limit the number of bytes retrieved without knowing the size of the representation.</p> 687 <div id="rfc.figure.u. 3"></div><pre class="inline"><span id="rfc.iref.g.10"></span><span id="rfc.iref.g.11"></span> <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> = "-" <a href="#rule.ranges-specifier" class="smpl">suffix-length</a>683 <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.11"></span><span id="rfc.iref.g.12"></span> <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> = "-" <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> 688 684 <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> = 1*<a href="#imported.abnf" class="smpl">DIGIT</a> 689 685 </pre><p id="rfc.section.2.1.p.10">A suffix-byte-range-spec is used to specify the suffix of the representation data, of a length given by the suffix-length … … 700 696 <ul> 701 697 <li>The first 500 bytes (byte offsets 0-499, inclusive): 702 <div id="rfc.figure.u. 4"></div><pre class="text"> bytes=0-499698 <div id="rfc.figure.u.5"></div><pre class="text"> bytes=0-499 703 699 </pre> </li> 704 700 <li>The second 500 bytes (byte offsets 500-999, inclusive): 705 <div id="rfc.figure.u. 5"></div><pre class="text"> bytes=500-999701 <div id="rfc.figure.u.6"></div><pre class="text"> bytes=500-999 706 702 </pre> </li> 707 703 <li>The final 500 bytes (byte offsets 9500-9999, inclusive): 708 <div id="rfc.figure.u. 6"></div><pre class="text"> bytes=-500709 </pre> Or: <div id="rfc.figure.u. 7"></div><pre class="text"> bytes=9500-704 <div id="rfc.figure.u.7"></div><pre class="text"> bytes=-500 705 </pre> Or: <div id="rfc.figure.u.8"></div><pre class="text"> bytes=9500- 710 706 </pre> </li> 711 707 <li>The first and last bytes only (bytes 0 and 9999): 712 <div id="rfc.figure.u. 8"></div><pre class="text"> bytes=0-0,-1708 <div id="rfc.figure.u.9"></div><pre class="text"> bytes=0-0,-1 713 709 </pre> </li> 714 <li> Several legal but not canonicalspecifications of the second 500 bytes (byte offsets 500-999, inclusive):715 <div id="rfc.figure.u. 9"></div><pre class="text"> bytes=500-600,601-999710 <li>Other valid (but not canonical) specifications of the second 500 bytes (byte offsets 500-999, inclusive): 711 <div id="rfc.figure.u.10"></div><pre class="text"> bytes=500-600,601-999 716 712 bytes=500-700,601-999 717 713 </pre> </li> 718 714 </ul> 719 715 <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a> <a id="range.units.other" href="#range.units.other">Other Range Units</a></h2> 720 <p id="rfc.section.2.2.p.1">The only range unit defined by HTTP/1.1 is "bytes" (<a href="#byte.ranges" title="Byte Ranges">Section 2.1</a>). Additional units can be defined as described in <a href="#range.unit.registry" title="Range Unit Registry">Section 5.1</a>. 721 </p> 722 <div id="rfc.iref.a.1"></div> 716 <p id="rfc.section.2.2.p.1">Range units are intended to be extensible. New range units ought to be registered with IANA, as defined in <a href="#range.unit.registry" title="Range Unit Registry">Section 5.1</a>. 717 </p> 718 <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.13"></span> <a href="#range.units.other" class="smpl">other-range-unit</a> = <a href="#imported.abnf" class="smpl">token</a> 719 </pre><div id="rfc.iref.a.1"></div> 723 720 <h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a> <a id="header.accept-ranges" href="#header.accept-ranges">Accept-Ranges</a></h2> 724 721 <p id="rfc.section.2.3.p.1">The "Accept-Ranges" header field allows a resource to indicate its acceptance of range requests.</p> 725 <div id="rfc.figure.u.1 0"></div><pre class="inline"><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span> <a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a>722 <div id="rfc.figure.u.12"></div><pre class="inline"><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span> <a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a> 726 723 <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a> = 1#<a href="#range.units" class="smpl">range-unit</a> / "none" 727 724 </pre><p id="rfc.section.2.3.p.3">Origin servers that accept byte-range requests <em class="bcp14">MAY</em> send 728 725 </p> 729 <div id="rfc.figure.u.1 1"></div><pre class="text"> Accept-Ranges: bytes726 <div id="rfc.figure.u.13"></div><pre class="text"> Accept-Ranges: bytes 730 727 </pre><p id="rfc.section.2.3.p.5">but are not required to do so. Clients <em class="bcp14">MAY</em> generate range requests without having received this header field for the resource involved. Range units are defined in <a href="#range.units" title="Range Units">Section 2</a>. 731 728 </p> 732 729 <p id="rfc.section.2.3.p.6">Servers that do not accept any kind of range request for a resource <em class="bcp14">MAY</em> send 733 730 </p> 734 <div id="rfc.figure.u.1 2"></div><pre class="text"> Accept-Ranges: none731 <div id="rfc.figure.u.14"></div><pre class="text"> Accept-Ranges: none 735 732 </pre><p id="rfc.section.2.3.p.8">to advise the client not to attempt a range request.</p> 736 733 <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a> <a id="range.requests" href="#range.requests">Range Requests</a></h1> … … 740 737 of the selected representation data in a successful response, rather than the entire representation data. 741 738 </p> 742 <div id="rfc.figure.u.1 3"></div><pre class="inline"><span id="rfc.iref.g.14"></span> <a href="#header.range" class="smpl">Range</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> / <a href="#header.range" class="smpl">other-ranges-specifier</a>743 <a href="#header.range" class="smpl">other-ranges-specifier</a> = <a href="#range.units " class="smpl">other-range-unit</a> "=" <a href="#header.range" class="smpl">other-range-set</a>739 <div id="rfc.figure.u.15"></div><pre class="inline"><span id="rfc.iref.g.16"></span> <a href="#header.range" class="smpl">Range</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> / <a href="#header.range" class="smpl">other-ranges-specifier</a> 740 <a href="#header.range" class="smpl">other-ranges-specifier</a> = <a href="#range.units.other" class="smpl">other-range-unit</a> "=" <a href="#header.range" class="smpl">other-range-set</a> 744 741 <a href="#header.range" class="smpl">other-range-set</a> = 1*<a href="#imported.abnf" class="smpl">CHAR</a> 745 742 </pre><p id="rfc.section.3.1.p.3">A server <em class="bcp14">MAY</em> ignore the Range header field. However, origin servers and intermediate caches ought to support byte ranges when possible, … … 765 762 is unchanged, send me the part(s) that I am requesting in Range; otherwise, send me the entire representation. 766 763 </p> 767 <div id="rfc.figure.u.1 4"></div><pre class="inline"><span id="rfc.iref.g.15"></span> <a href="#header.if-range" class="smpl">If-Range</a> = <a href="#imported.abnf" class="smpl">entity-tag</a> / <a href="#imported.abnf" class="smpl">HTTP-date</a>764 <div id="rfc.figure.u.16"></div><pre class="inline"><span id="rfc.iref.g.17"></span> <a href="#header.if-range" class="smpl">If-Range</a> = <a href="#imported.abnf" class="smpl">entity-tag</a> / <a href="#imported.abnf" class="smpl">HTTP-date</a> 768 765 </pre><p id="rfc.section.3.2.p.4">Clients <em class="bcp14">MUST NOT</em> use an entity-tag marked as weak in an If-Range field value and <em class="bcp14">MUST NOT</em> use a <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> date in an If-Range field value unless it has no entity-tag for the representation and the Last-Modified date it does have 769 766 for the representation 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.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>. … … 783 780 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, 784 781 </p> 785 <div id="rfc.figure.u.1 5"></div><pre class="text">HTTP/1.1 206 Partial Content782 <div id="rfc.figure.u.17"></div><pre class="text">HTTP/1.1 206 Partial Content 786 783 Date: Wed, 15 Nov 1995 06:25:24 GMT 787 784 Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT … … 799 796 <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. 800 797 </p> 801 <div id="rfc.iref. 18"></div>798 <div id="rfc.iref.20"></div> 802 799 <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> 803 800 <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. … … 816 813 <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. 817 814 </p> 818 <div id="rfc.iref. 18"></div>815 <div id="rfc.iref.20"></div> 819 816 <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> 820 817 <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 … … 823 820 <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>). 824 821 </p> 825 <div id="rfc.figure.u.1 6"></div>822 <div id="rfc.figure.u.18"></div> 826 823 <p>For example:</p> <pre class="text">HTTP/1.1 416 Range Not Satisfiable 827 824 Date: Mon, 20 Jan 2012 15:41:54 GMT … … 838 835 body is intended to be applied. 839 836 </p> 840 <div id="rfc.figure.u.1 7"></div><pre class="inline"><span id="rfc.iref.g.16"></span><span id="rfc.iref.g.17"></span><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> <a href="#header.content-range" class="smpl">Content-Range</a> = <a href="#header.content-range" class="smpl">byte-content-range</a>837 <div id="rfc.figure.u.19"></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> 841 838 / <a href="#header.content-range" class="smpl">other-content-range</a> 842 839 843 <a href="#header.content-range" class="smpl">byte-content-range</a> = <a href="# range.units" class="smpl">bytes-unit</a> <a href="#imported.abnf" class="smpl">SP</a>840 <a href="#header.content-range" class="smpl">byte-content-range</a> = <a href="#byte.ranges" class="smpl">bytes-unit</a> <a href="#imported.abnf" class="smpl">SP</a> 844 841 ( <a href="#header.content-range" class="smpl">byte-range-resp</a> / <a href="#header.content-range" class="smpl">unsatisfied-range</a> ) 845 842 … … 850 847 <a href="#header.content-range" class="smpl">complete-length</a> = 1*<a href="#imported.abnf" class="smpl">DIGIT</a> 851 848 852 <a href="#header.content-range" class="smpl">other-content-range</a> = <a href="#range.units " 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>849 <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> 853 850 <a href="#header.content-range" class="smpl">other-range-resp</a> = *<a href="#imported.abnf" class="smpl">CHAR</a> 854 851 </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. … … 864 861 selected representation is known by the sender to be 1234 bytes: 865 862 </p> 866 <div id="rfc.figure.u. 18"></div><pre class="text"> Content-Range: bytes 42-1233/1234863 <div id="rfc.figure.u.20"></div><pre class="text"> Content-Range: bytes 42-1233/1234 867 864 </pre><p id="rfc.section.4.4.p.8">or this second example would apply when the complete length is unknown:</p> 868 <div id="rfc.figure.u. 19"></div><pre class="text"> Content-Range: bytes 42-1233/*865 <div id="rfc.figure.u.21"></div><pre class="text"> Content-Range: bytes 42-1233/* 869 866 </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: 870 867 </p> 871 <div id="rfc.figure.u.2 0"></div><pre class="text"> Content-Range: bytes */1234868 <div id="rfc.figure.u.22"></div><pre class="text"> Content-Range: bytes */1234 872 869 </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 by 873 870 the server generating the response because that is how it determined the range to be unsatisfiable. … … 879 876 <ul> 880 877 <li>The first 500 bytes: 881 <div id="rfc.figure.u.2 1"></div><pre class="text"> Content-Range: bytes 0-499/1234878 <div id="rfc.figure.u.23"></div><pre class="text"> Content-Range: bytes 0-499/1234 882 879 </pre> </li> 883 880 <li>The second 500 bytes: 884 <div id="rfc.figure.u.2 2"></div><pre class="text"> Content-Range: bytes 500-999/1234881 <div id="rfc.figure.u.24"></div><pre class="text"> Content-Range: bytes 500-999/1234 885 882 </pre> </li> 886 883 <li>All except for the first 500 bytes: 887 <div id="rfc.figure.u.2 3"></div><pre class="text"> Content-Range: bytes 500-1233/1234884 <div id="rfc.figure.u.25"></div><pre class="text"> Content-Range: bytes 500-1233/1234 888 885 </pre> </li> 889 886 <li>The last 500 bytes: 890 <div id="rfc.figure.u.2 4"></div><pre class="text"> Content-Range: bytes 734-1233/1234887 <div id="rfc.figure.u.26"></div><pre class="text"> Content-Range: bytes 734-1233/1234 891 888 </pre> </li> 892 889 </ul> … … 941 938 <td class="left">bytes</td> 942 939 <td class="left">a range of octets</td> 943 <td class="left"><a href="# range.units" title="Range Units">Section 2</a></td>940 <td class="left"><a href="#byte.ranges" title="Byte Ranges">Section 2.1</a></td> 944 941 </tr> 945 942 <tr> 946 943 <td class="left">none</td> 947 944 <td class="left">reserved as keyword, indicating no ranges are supported</td> 948 <td class="left"><a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges. 1" title="Accept-Ranges">Section 2.3</a></td>945 <td class="left"><a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges.2" title="Accept-Ranges">Section 2.3</a></td> 949 946 </tr> 950 947 </tbody> … … 1000 997 <td class="left">http</td> 1001 998 <td class="left">standard</td> 1002 <td class="left"> <a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges. 2" title="Accept-Ranges">Section 2.3</a>999 <td class="left"> <a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges.3" title="Accept-Ranges">Section 2.3</a> 1003 1000 </td> 1004 1001 </tr> … … 1030 1027 <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a id="security.considerations" href="#security.considerations">Security Considerations</a></h1> 1031 1028 <p id="rfc.section.6.p.1">This section is meant to inform developers, information providers, and users of known security concerns specific to the HTTP/1.1 1032 range request mechanisms. More general security considerations are addressed in HTTP messaging <a href="#Part1" id="rfc.xref.Part1.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a> and semantics <a href="#Part2" id="rfc.xref.Part2. 1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[Part2]</cite></a>.1029 range request mechanisms. More general security considerations are addressed in HTTP messaging <a href="#Part1" id="rfc.xref.Part1.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a> and semantics <a href="#Part2" id="rfc.xref.Part2.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[Part2]</cite></a>. 1033 1030 </p> 1034 1031 <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a> <a id="overlapping.ranges" href="#overlapping.ranges">Overlapping Ranges</a></h2> … … 1169 1166 </p> 1170 1167 </div> 1171 <div id="rfc.figure.u.2 5"></div>1168 <div id="rfc.figure.u.27"></div> 1172 1169 <p>For example:</p><pre class="text"> HTTP/1.1 206 Partial Content 1173 1170 Date: Wed, 15 Nov 1995 06:25:24 GMT … … 1187 1184 ...the second range 1188 1185 --THIS_STRING_SEPARATES-- 1189 </pre><div id="rfc.figure.u.2 6"></div>1186 </pre><div id="rfc.figure.u.28"></div> 1190 1187 <p>Another example, using the "exampleunit" range unit:</p> <pre class="text"> HTTP/1.1 206 Partial Content 1191 1188 Date: Tue, 14 Nov 1995 06:25:24 GMT … … 1235 1232 <p id="rfc.section.C.p.3">The rules below are defined in <a href="#Part1" id="rfc.xref.Part1.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>: 1236 1233 </p> 1237 <div id="rfc.figure.u.2 7"></div><pre class="inline"> <a href="#imported.abnf" class="smpl">OWS</a> = <OWS, defined in <a href="#Part1" id="rfc.xref.Part1.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>, <a href="p1-messaging.html#whitespace" title="Whitespace">Section 3.2.3</a>>1234 <div id="rfc.figure.u.29"></div><pre class="inline"> <a href="#imported.abnf" class="smpl">OWS</a> = <OWS, defined in <a href="#Part1" id="rfc.xref.Part1.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>, <a href="p1-messaging.html#whitespace" title="Whitespace">Section 3.2.3</a>> 1238 1235 <a href="#imported.abnf" class="smpl">token</a> = <token, defined in <a href="#Part1" id="rfc.xref.Part1.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>, <a href="p1-messaging.html#field.components" title="Field value components">Section 3.2.6</a>> 1239 1236 </pre><p id="rfc.section.C.p.5">The rules below are defined in other parts:</p> 1240 <div id="rfc.figure.u. 28"></div><pre class="inline"> <a href="#imported.abnf" class="smpl">HTTP-date</a> = <HTTP-date, defined in <a href="#Part2" id="rfc.xref.Part2.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[Part2]</cite></a>, <a href="p2-semantics.html#http.date" title="Date/Time Formats">Section 7.1.1.1</a>>1237 <div id="rfc.figure.u.30"></div><pre class="inline"> <a href="#imported.abnf" class="smpl">HTTP-date</a> = <HTTP-date, defined in <a href="#Part2" id="rfc.xref.Part2.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[Part2]</cite></a>, <a href="p2-semantics.html#http.date" title="Date/Time Formats">Section 7.1.1.1</a>> 1241 1238 <a href="#imported.abnf" class="smpl">entity-tag</a> = <entity-tag, defined in <a href="#Part4" id="rfc.xref.Part4.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>, <a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a>> 1242 1239 </pre><h1 id="rfc.section.D"><a href="#rfc.section.D">D.</a> <a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1> 1243 <div id="rfc.figure.u. 29"></div> <pre class="inline"><a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = acceptable-ranges1240 <div id="rfc.figure.u.31"></div> <pre class="inline"><a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = acceptable-ranges 1244 1241 1245 1242 <a href="#header.content-range" class="smpl">Content-Range</a> = byte-content-range / other-content-range … … 1265 1262 <a href="#rule.ranges-specifier" class="smpl">byte-range-spec</a> = first-byte-pos "-" [ last-byte-pos ] 1266 1263 <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> = bytes-unit "=" byte-range-set 1267 <a href="# range.units" class="smpl">bytes-unit</a> = "bytes"1264 <a href="#byte.ranges" class="smpl">bytes-unit</a> = "bytes" 1268 1265 1269 1266 <a href="#header.content-range" class="smpl">complete-length</a> = 1*DIGIT … … 1278 1275 <a href="#header.content-range" class="smpl">other-range-resp</a> = *CHAR 1279 1276 <a href="#header.range" class="smpl">other-range-set</a> = 1*CHAR 1280 <a href="#range.units " class="smpl">other-range-unit</a> = token1277 <a href="#range.units.other" class="smpl">other-range-unit</a> = token 1281 1278 <a href="#header.range" class="smpl">other-ranges-specifier</a> = other-range-unit "=" other-range-set 1282 1279 … … 1319 1316 <ul class="ind"> 1320 1317 <li><a id="rfc.index.2" href="#rfc.index.2"><b>2</b></a><ul> 1321 <li>206 Partial Content (status code) <a href="#rfc.iref. 18"><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>1318 <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> 1322 1319 </ul> 1323 1320 </li> 1324 1321 <li><a id="rfc.index.4" href="#rfc.index.4"><b>4</b></a><ul> 1325 <li>416 Range Not Satisfiable (status code) <a href="#rfc.iref. 18"><b>4.3</b></a>, <a href="#rfc.xref.status.416.1">5.2</a></li>1322 <li>416 Range Not Satisfiable (status code) <a href="#rfc.iref.20"><b>4.3</b></a>, <a href="#rfc.xref.status.416.1">5.2</a></li> 1326 1323 </ul> 1327 1324 </li> 1328 1325 <li><a id="rfc.index.A" href="#rfc.index.A"><b>A</b></a><ul> 1329 <li>Accept-Ranges header field <a href="#rfc. iref.a.1"><b>2.3</b></a>, <a href="#rfc.xref.header.accept-ranges.1">5.1.2</a>, <a href="#rfc.xref.header.accept-ranges.2">5.3</a></li>1326 <li>Accept-Ranges header field <a href="#rfc.xref.header.accept-ranges.1">2</a>, <a href="#rfc.iref.a.1"><b>2.3</b></a>, <a href="#rfc.xref.header.accept-ranges.2">5.1.2</a>, <a href="#rfc.xref.header.accept-ranges.3">5.3</a></li> 1330 1327 </ul> 1331 1328 </li> … … 1342 1339 <li><tt>Grammar</tt> 1343 1340 <ul> 1344 <li><tt>Accept-Ranges</tt> <a href="#rfc.iref.g.1 2"><b>2.3</b></a></li>1345 <li><tt>acceptable-ranges</tt> <a href="#rfc.iref.g.1 3"><b>2.3</b></a></li>1346 <li><tt>byte-content-range</tt> <a href="#rfc.iref.g.1 7"><b>4.4</b></a></li>1347 <li><tt>byte-range</tt> <a href="#rfc.iref.g. 19"><b>4.4</b></a></li>1348 <li><tt>byte-range-resp</tt> <a href="#rfc.iref.g. 18"><b>4.4</b></a></li>1349 <li><tt>byte-range-set</tt> <a href="#rfc.iref.g. 6"><b>2.1</b></a></li>1350 <li><tt>byte-range-spec</tt> <a href="#rfc.iref.g. 7"><b>2.1</b></a></li>1351 <li><tt>byte-ranges-specifier</tt> <a href="#rfc.iref.g. 5"><b>2.1</b></a></li>1352 <li><tt>bytes-unit</tt> <a href="#rfc.iref.g.2"> <b>2</b></a></li>1353 <li><tt>complete-length</tt> <a href="#rfc.iref.g.2 3"><b>4.4</b></a></li>1354 <li><tt>Content-Range</tt> <a href="#rfc.iref.g.1 6"><b>4.4</b></a></li>1355 <li><tt>first-byte-pos</tt> <a href="#rfc.iref.g. 8"><b>2.1</b></a></li>1356 <li><tt>If-Range</tt> <a href="#rfc.iref.g.1 5"><b>3.2</b></a></li>1357 <li><tt>last-byte-pos</tt> <a href="#rfc.iref.g. 9"><b>2.1</b></a></li>1358 <li><tt>other-content-range</tt> <a href="#rfc.iref.g.2 1"><b>4.4</b></a></li>1359 <li><tt>other-range-resp</tt> <a href="#rfc.iref.g.2 2"><b>4.4</b></a></li>1360 <li><tt>other-range-unit</tt> <a href="#rfc.iref.g.3"> <b>2</b></a></li>1361 <li><tt>Range</tt> <a href="#rfc.iref.g.1 4"><b>3.1</b></a></li>1341 <li><tt>Accept-Ranges</tt> <a href="#rfc.iref.g.14"><b>2.3</b></a></li> 1342 <li><tt>acceptable-ranges</tt> <a href="#rfc.iref.g.15"><b>2.3</b></a></li> 1343 <li><tt>byte-content-range</tt> <a href="#rfc.iref.g.19"><b>4.4</b></a></li> 1344 <li><tt>byte-range</tt> <a href="#rfc.iref.g.21"><b>4.4</b></a></li> 1345 <li><tt>byte-range-resp</tt> <a href="#rfc.iref.g.20"><b>4.4</b></a></li> 1346 <li><tt>byte-range-set</tt> <a href="#rfc.iref.g.7"><b>2.1</b></a></li> 1347 <li><tt>byte-range-spec</tt> <a href="#rfc.iref.g.8"><b>2.1</b></a></li> 1348 <li><tt>byte-ranges-specifier</tt> <a href="#rfc.iref.g.6"><b>2.1</b></a></li> 1349 <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> 1350 <li><tt>complete-length</tt> <a href="#rfc.iref.g.25"><b>4.4</b></a></li> 1351 <li><tt>Content-Range</tt> <a href="#rfc.iref.g.18"><b>4.4</b></a></li> 1352 <li><tt>first-byte-pos</tt> <a href="#rfc.iref.g.9"><b>2.1</b></a></li> 1353 <li><tt>If-Range</tt> <a href="#rfc.iref.g.17"><b>3.2</b></a></li> 1354 <li><tt>last-byte-pos</tt> <a href="#rfc.iref.g.10"><b>2.1</b></a></li> 1355 <li><tt>other-content-range</tt> <a href="#rfc.iref.g.23"><b>4.4</b></a></li> 1356 <li><tt>other-range-resp</tt> <a href="#rfc.iref.g.24"><b>4.4</b></a></li> 1357 <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> 1358 <li><tt>Range</tt> <a href="#rfc.iref.g.16"><b>3.1</b></a></li> 1362 1359 <li><tt>range-unit</tt> <a href="#rfc.iref.g.1"><b>2</b></a></li> 1363 <li><tt>ranges-specifier</tt> <a href="#rfc.iref.g. 4"><b>2.1</b></a></li>1364 <li><tt>suffix-byte-range-spec</tt> <a href="#rfc.iref.g.1 0"><b>2.1</b></a></li>1365 <li><tt>suffix-length</tt> <a href="#rfc.iref.g.1 1"><b>2.1</b></a></li>1366 <li><tt>unsatisfied-range</tt> <a href="#rfc.iref.g.2 0"><b>4.4</b></a></li>1360 <li><tt>ranges-specifier</tt> <a href="#rfc.iref.g.5"><b>2.1</b></a></li> 1361 <li><tt>suffix-byte-range-spec</tt> <a href="#rfc.iref.g.11"><b>2.1</b></a></li> 1362 <li><tt>suffix-length</tt> <a href="#rfc.iref.g.12"><b>2.1</b></a></li> 1363 <li><tt>unsatisfied-range</tt> <a href="#rfc.iref.g.22"><b>4.4</b></a></li> 1367 1364 </ul> 1368 1365 </li> … … 1393 1390 </ul> 1394 1391 </li> 1395 <li><em>Part2</em> <a href="#rfc.xref.Part2.1">6</a>, <a href="#Part2"><b>8.1</b></a>, <a href="#rfc.xref.Part2.2">C</a><ul> 1396 <li><em>Section 7.1.1.1</em> <a href="#rfc.xref.Part2.2">C</a></li> 1392 <li><em>Part2</em> <a href="#rfc.xref.Part2.1">2.1</a>, <a href="#rfc.xref.Part2.2">6</a>, <a href="#Part2"><b>8.1</b></a>, <a href="#rfc.xref.Part2.3">C</a><ul> 1393 <li><em>Section 3</em> <a href="#rfc.xref.Part2.1">2.1</a></li> 1394 <li><em>Section 7.1.1.1</em> <a href="#rfc.xref.Part2.3">C</a></li> 1397 1395 </ul> 1398 1396 </li> … … 1415 1413 </li> 1416 1414 <li><em>RFC2119</em> <a href="#rfc.xref.RFC2119.1">1.1</a>, <a href="#RFC2119"><b>8.1</b></a></li> 1417 <li><em>RFC2616</em> <a href="# RFC2616"><b>8.2</b></a></li>1415 <li><em>RFC2616</em> <a href="#rfc.xref.RFC2616.1">1</a>, <a href="#RFC2616"><b>8.2</b></a></li> 1418 1416 <li><em>RFC5226</em> <a href="#rfc.xref.RFC5226.1">5.1.1</a>, <a href="#RFC5226"><b>8.2</b></a><ul> 1419 1417 <li><em>Section 4.1</em> <a href="#rfc.xref.RFC5226.1">5.1.1</a></li> -
draft-ietf-httpbis/latest/p5-range.xml
r2143 r2144 23 23 <!ENTITY whitespace "<xref target='Part1' x:rel='#whitespace' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 24 24 <!ENTITY field-components "<xref target='Part1' x:rel='#field.components' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 25 <!ENTITY http-date "<xref target='Part2' x:rel='#http.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">26 25 <!ENTITY messaging "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 27 26 <!ENTITY semantics "<xref target='Part2' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 27 <!ENTITY http-date "<xref target='Part2' x:rel='#http.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 28 <!ENTITY representation "<xref target='Part2' x:rel='#representations' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 28 29 <!ENTITY entity-tags "<xref target='Part4' x:rel='#header.etag' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 29 30 <!ENTITY weak-and-strong-validators "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> … … 129 130 <section title="Introduction" anchor="introduction"> 130 131 <t> 131 HTTP clients often encounter interrupted data transfers as a result 132 of canceled requests or dropped connections. When a client has stored 133 a partial representation, it is desirable to request the remainder 134 of that representation in a subsequent request rather than transfer 135 the entire representation. 136 There are also a number of Web applications that benefit from being 137 able to request only a subset of a larger representation, such as a 138 single page of a very large document or only part of an image to be 139 rendered by a device with limited local storage. 140 </t> 141 <t> 142 This document defines HTTP/1.1 range requests, 143 partial responses, and the multipart/byteranges media type. 144 The protocol for range requests is an &OPTIONAL; feature of HTTP, 145 designed so resources or recipients that do not implement this feature 146 can respond as if it is a normal GET request without impacting 147 interoperability. Partial responses are indicated by a distinct status 148 code to not be mistaken for full responses by intermediate caches 149 that might not implement the feature. 150 </t> 151 <t> 152 Although the HTTP range request mechanism is designed to allow for 132 Hypertext Transfer Protocol (HTTP) clients often encounter interrupted data 133 transfers as a result of canceled requests or dropped connections. When a 134 client has stored a partial representation, it is desirable to request the 135 remainder of that representation in a subsequent request rather than 136 transfer the entire representation. Likewise, devices with limited local 137 storage might benefit from being able to request only a subset of a larger 138 representation, such as a single page of a very large document, or the 139 dimensions of an embedded image. 140 </t> 141 <t> 142 This document defines HTTP/1.1 range requests, partial responses, and the 143 multipart/byteranges media type, obsoleting those parts previously defined 144 in <xref target="RFC2616"/>. Range requests are an &OPTIONAL; feature 145 of HTTP, designed so that recipients not implementing this feature (or not 146 supporting it for the target resource) can respond as if it is a normal 147 GET request without impacting interoperability. Partial responses are 148 indicated by a distinct status code to not be mistaken for full responses 149 by caches that might not implement the feature. 150 </t> 151 <t> 152 Although the range request mechanism is designed to allow for 153 153 extensible range types, this specification only defines requests for 154 154 byte ranges. … … 180 180 181 181 <section title="Range Units" anchor="range.units"> 182 <x:anchor-alias value="bytes-unit"/>183 <x:anchor-alias value="other-range-unit"/>184 182 <x:anchor-alias value="range-unit"/> 185 183 <x:anchor-alias value="range unit"/> … … 187 185 A representation can be partitioned into subranges according to various 188 186 structural units, depending on the structure inherent in the 189 representation's media type. Such a <x:dfn>range unit</x:dfn> can be used 190 in the <x:ref>Range</x:ref> (<xref target="header.range"/>) and 187 representation's media type. This "<x:dfn>range unit</x:dfn>" is used 188 in the <x:ref>Accept-Ranges</x:ref> (<xref target="header.accept-ranges"/>) 189 response header field to advertise support for range requests, the 190 <x:ref>Range</x:ref> (<xref target="header.range"/>) request header field 191 to delineate the parts of a representation that are requested, and the 191 192 <x:ref>Content-Range</x:ref> (<xref target="header.content-range"/>) 192 header fields to delineate the parts of a representation that are193 either requested or transferred, respectively.194 </t> 195 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="range-unit"/><iref primary="true" item="Grammar" subitem="bytes-unit"/><iref primary="true"item="Grammar" subitem="other-range-unit"/>193 payload header field to describe which part of a representation is being 194 transferred. 195 </t> 196 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="range-unit"/><iref item="Grammar" subitem="bytes-unit"/><iref item="Grammar" subitem="other-range-unit"/> 196 197 <x:ref>range-unit</x:ref> = <x:ref>bytes-unit</x:ref> / <x:ref>other-range-unit</x:ref> 198 </artwork></figure> 199 200 <section title="Byte Ranges" anchor="byte.ranges"> 201 <x:anchor-alias value="bytes-unit"/> 202 <t> 203 Since representation data is transferred in payloads as a sequence of 204 octets, a byte range is a meaningful substructure for any representation 205 transferable over HTTP (&representation;). We define the "bytes" range 206 unit for expressing subranges of the data's octet sequence. 207 </t> 208 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="bytes-unit"/> 197 209 <x:ref>bytes-unit</x:ref> = "bytes" 198 <x:ref>other-range-unit</x:ref> = <x:ref>token</x:ref> 199 </artwork></figure> 200 201 <section title="Byte Ranges" anchor="byte.ranges"> 202 <t> 203 Since all HTTP representations are transferred as sequences 204 of bytes, the concept of a byte range is meaningful for any HTTP 205 representation. (However, not all clients and servers need to support byte-range 206 operations.) 207 </t> 208 <t> 209 Byte range specifications in HTTP apply to the sequence of bytes in 210 the representation data (not necessarily the same as the message body). 211 </t> 210 </artwork></figure> 212 211 <t anchor="rule.ranges-specifier"> 213 212 <x:anchor-alias value="byte-range-set"/> … … 310 309 </artwork></figure> 311 310 </t> 312 <t> Several legal but not canonicalspecifications of the second 500311 <t>Other valid (but not canonical) specifications of the second 500 313 312 bytes (byte offsets 500-999, inclusive): 314 313 <figure><artwork type="example" x:indent-with=" "> … … 322 321 323 322 <section title="Other Range Units" anchor="range.units.other"> 324 <t> 325 The only range unit defined by HTTP/1.1 is "bytes" 326 (<xref target="byte.ranges"/>). Additional units can be defined as described 327 in <xref target="range.unit.registry"/>. 328 </t> 329 </section> 323 <x:anchor-alias value="other-range-unit"/> 324 <t> 325 Range units are intended to be extensible. New range units ought to be 326 registered with IANA, as defined in <xref target="range.unit.registry"/>. 327 </t> 328 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="other-range-unit"/> 329 <x:ref>other-range-unit</x:ref> = <x:ref>token</x:ref> 330 </artwork></figure> 331 </section> 332 330 333 <section title="Accept-Ranges" anchor="header.accept-ranges"> 331 334 <iref primary="true" item="Accept-Ranges header field" x:for-anchor=""/> … … 825 828 <c>bytes</c> 826 829 <c>a range of octets</c> 827 <c><xref target=" range.units"/></c>830 <c><xref target="byte.ranges"/></c> 828 831 829 832 <c>none</c>
Note: See TracChangeset
for help on using the changeset viewer.