Changeset 1397 for draft-ietf-httpbis
- Timestamp:
- 09/08/11 14:54:17 (10 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p5-range.html
r1396 r1397 646 646 <div id="rfc.figure.u.1"></div><pre class="inline"> <a href="#core.rules" class="smpl">OWS</a> = <OWS, defined in <a href="#Part1" id="rfc.xref.Part1.3"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 1.2.2</a>> 647 647 <a href="#core.rules" class="smpl">token</a> = <token, defined in <a href="#Part1" id="rfc.xref.Part1.4"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#field.rules" title="Common Field ABNF Rules">Section 3.2.3</a>> 648 <a href="#core.rules" class="smpl">HTTP-date</a> = <HTTP-date, defined in <a href="#Part1" id="rfc.xref.Part1.5"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#date.time.formats.full.date" title="Date/Time Formats: Full Date">Section 6.1</a>> 648 649 </pre><h3 id="rfc.section.1.2.2"><a href="#rfc.section.1.2.2">1.2.2</a> <a id="abnf.dependencies" href="#abnf.dependencies">ABNF Rules defined in other Parts of the Specification</a></h3> 649 650 <p id="rfc.section.1.2.2.p.1">The ABNF rules below are defined in other parts:</p> 650 <div id="rfc.figure.u.2"></div><pre class="inline"> <a href="#abnf.dependencies" class="smpl">HTTP-date</a> = <HTTP-date, defined in <a href="#Part1" id="rfc.xref.Part1.5"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#date.time.formats.full.date" title="Date/Time Formats: Full Date">Section 6.1</a>> 651 </pre><div id="rfc.figure.u.3"></div><pre class="inline"> <a href="#abnf.dependencies" class="smpl">entity-tag</a> = <entity-tag, defined in <a href="#Part4" id="rfc.xref.Part4.1"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>, <a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a>> 651 <div id="rfc.figure.u.2"></div><pre class="inline"> <a href="#abnf.dependencies" class="smpl">entity-tag</a> = <entity-tag, defined in <a href="#Part4" id="rfc.xref.Part4.1"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>, <a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a>> 652 652 </pre><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a> <a id="range.units" href="#range.units">Range Units</a></h1> 653 653 <p id="rfc.section.2.p.1">HTTP/1.1 allows a client to request that only part (a range) of the representation be included within the response. HTTP/1.1 654 654 uses range units in the Range (<a href="#header.range" id="rfc.xref.header.range.1" title="Range">Section 5.4</a>) and Content-Range (<a href="#header.content-range" id="rfc.xref.header.content-range.1" title="Content-Range">Section 5.2</a>) header fields. A representation can be broken down into subranges according to various structural units. 655 655 </p> 656 <div id="rfc.figure.u. 4"></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>656 <div id="rfc.figure.u.3"></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> 657 657 <a href="#range.units" class="smpl">bytes-unit</a> = "bytes" 658 658 <a href="#range.units" class="smpl">other-range-unit</a> = <a href="#core.rules" class="smpl">token</a> … … 733 733 <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a> <a id="header.accept-ranges" href="#header.accept-ranges">Accept-Ranges</a></h2> 734 734 <p id="rfc.section.5.1.p.1">The "Accept-Ranges" header field allows a resource to indicate its acceptance of range requests.</p> 735 <div id="rfc.figure.u. 5"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span> <a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a>735 <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span> <a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a> 736 736 <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a> = 1#<a href="#range.units" class="smpl">range-unit</a> / "none" 737 737 </pre><p id="rfc.section.5.1.p.3">Origin servers that accept byte-range requests <em class="bcp14">MAY</em> send 738 738 </p> 739 <div id="rfc.figure.u. 6"></div><pre class="text"> Accept-Ranges: bytes739 <div id="rfc.figure.u.5"></div><pre class="text"> Accept-Ranges: bytes 740 740 </pre><p id="rfc.section.5.1.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>. 741 741 </p> 742 742 <p id="rfc.section.5.1.p.6">Servers that do not accept any kind of range request for a resource <em class="bcp14">MAY</em> send 743 743 </p> 744 <div id="rfc.figure.u. 7"></div><pre class="text"> Accept-Ranges: none744 <div id="rfc.figure.u.6"></div><pre class="text"> Accept-Ranges: none 745 745 </pre><p id="rfc.section.5.1.p.8">to advise the client not to attempt a range request.</p> 746 746 <div id="rfc.iref.c.1"></div> … … 752 752 <p id="rfc.section.5.2.p.2">Range units are defined in <a href="#range.units" title="Range Units">Section 2</a>. 753 753 </p> 754 <div id="rfc.figure.u. 8"></div><pre class="inline"><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="#header.content-range" class="smpl">Content-Range</a> = <a href="#header.content-range" class="smpl">content-range-spec</a>754 <div id="rfc.figure.u.7"></div><pre class="inline"><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="#header.content-range" class="smpl">Content-Range</a> = <a href="#header.content-range" class="smpl">content-range-spec</a> 755 755 756 756 <a href="#header.content-range" class="smpl">content-range-spec</a> = <a href="#header.content-range" class="smpl">byte-content-range-spec</a> … … 782 782 <ul> 783 783 <li>The first 500 bytes: 784 <div id="rfc.figure.u. 9"></div><pre class="text"> bytes 0-499/1234784 <div id="rfc.figure.u.8"></div><pre class="text"> bytes 0-499/1234 785 785 </pre> </li> 786 786 <li>The second 500 bytes: 787 <div id="rfc.figure.u. 10"></div><pre class="text"> bytes 500-999/1234787 <div id="rfc.figure.u.9"></div><pre class="text"> bytes 500-999/1234 788 788 </pre> </li> 789 789 <li>All except for the first 500 bytes: 790 <div id="rfc.figure.u.1 1"></div><pre class="text"> bytes 500-1233/1234790 <div id="rfc.figure.u.10"></div><pre class="text"> bytes 500-1233/1234 791 791 </pre> </li> 792 792 <li>The last 500 bytes: 793 <div id="rfc.figure.u.1 2"></div><pre class="text"> bytes 734-1233/1234793 <div id="rfc.figure.u.11"></div><pre class="text"> bytes 734-1233/1234 794 794 </pre> </li> 795 795 </ul> … … 798 798 and a Content-Length header field showing the number of bytes actually transferred. For example, 799 799 </p> 800 <div id="rfc.figure.u.1 3"></div><pre class="text"> HTTP/1.1 206 Partial Content800 <div id="rfc.figure.u.12"></div><pre class="text"> HTTP/1.1 206 Partial Content 801 801 Date: Wed, 15 Nov 1995 06:25:24 GMT 802 802 Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT … … 835 835 is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new representation". 836 836 </p> 837 <div id="rfc.figure.u.1 4"></div><pre class="inline"><span id="rfc.iref.g.11"></span> <a href="#header.if-range" class="smpl">If-Range</a> = <a href="#abnf.dependencies" class="smpl">entity-tag</a> / <a href="#abnf.dependencies" class="smpl">HTTP-date</a>837 <div id="rfc.figure.u.13"></div><pre class="inline"><span id="rfc.iref.g.11"></span> <a href="#header.if-range" class="smpl">If-Range</a> = <a href="#abnf.dependencies" class="smpl">entity-tag</a> / <a href="#core.rules" class="smpl">HTTP-date</a> 838 838 </pre><p id="rfc.section.5.3.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 Last-Modified date in an If-Range field value unless it has no entity-tag for the representation and the Last-Modified 839 839 date it does have 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.4"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>. … … 862 862 </p> 863 863 </div> 864 <div id="rfc.figure.u.1 5"></div><pre class="inline"><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span><span id="rfc.iref.g.16"></span><span id="rfc.iref.g.17"></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>864 <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span><span id="rfc.iref.g.16"></span><span id="rfc.iref.g.17"></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> 865 865 <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> ) 866 866 <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> ] … … 878 878 </p> 879 879 <p id="rfc.section.5.4.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> 880 <div id="rfc.figure.u.1 6"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span> <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> = "-" <a href="#rule.ranges-specifier" class="smpl">suffix-length</a>880 <div id="rfc.figure.u.15"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span> <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> = "-" <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> 881 881 <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> = 1*<a href="#notation" class="smpl">DIGIT</a> 882 882 </pre><p id="rfc.section.5.4.1.p.10">A suffix-byte-range-spec is used to specify the suffix of the representation body, of a length given by the suffix-length … … 891 891 <ul> 892 892 <li>The first 500 bytes (byte offsets 0-499, inclusive): 893 <div id="rfc.figure.u.1 7"></div><pre class="text"> bytes=0-499893 <div id="rfc.figure.u.16"></div><pre class="text"> bytes=0-499 894 894 </pre> </li> 895 895 <li>The second 500 bytes (byte offsets 500-999, inclusive): 896 <div id="rfc.figure.u.1 8"></div><pre class="text"> bytes=500-999896 <div id="rfc.figure.u.17"></div><pre class="text"> bytes=500-999 897 897 </pre> </li> 898 898 <li>The final 500 bytes (byte offsets 9500-9999, inclusive): 899 <div id="rfc.figure.u.1 9"></div><pre class="text"> bytes=-500900 </pre> Or: <div id="rfc.figure.u. 20"></div><pre class="text"> bytes=9500-899 <div id="rfc.figure.u.18"></div><pre class="text"> bytes=-500 900 </pre> Or: <div id="rfc.figure.u.19"></div><pre class="text"> bytes=9500- 901 901 </pre> </li> 902 902 <li>The first and last bytes only (bytes 0 and 9999): 903 <div id="rfc.figure.u.2 1"></div><pre class="text"> bytes=0-0,-1903 <div id="rfc.figure.u.20"></div><pre class="text"> bytes=0-0,-1 904 904 </pre> </li> 905 905 <li>Several legal but not canonical specifications of the second 500 bytes (byte offsets 500-999, inclusive): 906 <div id="rfc.figure.u.2 2"></div><pre class="text"> bytes=500-600,601-999906 <div id="rfc.figure.u.21"></div><pre class="text"> bytes=500-600,601-999 907 907 bytes=500-700,601-999 908 908 </pre> </li> … … 912 912 body, instead of the entire representation body. 913 913 </p> 914 <div id="rfc.figure.u.2 3"></div><pre class="inline"><span id="rfc.iref.g.20"></span> <a href="#range.retrieval.requests" class="smpl">Range</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> / <a href="#range.retrieval.requests" class="smpl">other-ranges-specifier</a>914 <div id="rfc.figure.u.22"></div><pre class="inline"><span id="rfc.iref.g.20"></span> <a href="#range.retrieval.requests" class="smpl">Range</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> / <a href="#range.retrieval.requests" class="smpl">other-ranges-specifier</a> 915 915 <a href="#range.retrieval.requests" class="smpl">other-ranges-specifier</a> = <a href="#range.units" class="smpl">other-range-unit</a> "=" <a href="#range.retrieval.requests" class="smpl">other-range-set</a> 916 916 <a href="#range.retrieval.requests" class="smpl">other-range-set</a> = 1*<a href="#notation" class="smpl">CHAR</a> … … 1174 1174 <dd>IESG</dd> 1175 1175 </dl> 1176 <div id="rfc.figure.u.2 4"></div>1176 <div id="rfc.figure.u.23"></div> 1177 1177 <p>For example:</p><pre class="text"> HTTP/1.1 206 Partial Content 1178 1178 Date: Wed, 15 Nov 1995 06:25:24 GMT … … 1191 1191 ...the second range 1192 1192 --THIS_STRING_SEPARATES-- 1193 </pre><div id="rfc.figure.u.2 5"></div>1193 </pre><div id="rfc.figure.u.24"></div> 1194 1194 <p>Other example:</p> <pre class="text"> HTTP/1.1 206 Partial Content 1195 1195 Date: Tue, 14 Nov 1995 06:25:24 GMT … … 1226 1226 </p> 1227 1227 <h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a> <a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1> 1228 <div id="rfc.figure.u.2 6"></div> <pre class="inline"><a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = acceptable-ranges1228 <div id="rfc.figure.u.25"></div> <pre class="inline"><a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = acceptable-ranges 1229 1229 1230 1230 <a href="#header.content-range" class="smpl">Content-Range</a> = content-range-spec 1231 1231 1232 <a href="# abnf.dependencies" class="smpl">HTTP-date</a> = <HTTP-date, defined in [Part1], Section 6.1>1232 <a href="#core.rules" class="smpl">HTTP-date</a> = <HTTP-date, defined in [Part1], Section 6.1> 1233 1233 1234 1234 <a href="#header.if-range" class="smpl">If-Range</a> = entity-tag / HTTP-date … … 1274 1274 1275 1275 <a href="#core.rules" class="smpl">token</a> = <token, defined in [Part1], Section 3.2.3> 1276 </pre> <div id="rfc.figure.u.2 7"></div>1276 </pre> <div id="rfc.figure.u.26"></div> 1277 1277 <p>ABNF diagnostics:</p><pre class="inline">; Accept-Ranges defined but not used 1278 1278 ; Content-Range defined but not used … … 1481 1481 </li> 1482 1482 <li><a id="rfc.index.P" href="#rfc.index.P"><b>P</b></a><ul> 1483 <li><em>Part1</em> <a href="#rfc.xref.Part1.1">1.2</a>, <a href="#rfc.xref.Part1.2">1.2.1</a>, <a href="#rfc.xref.Part1.3">1.2.1</a>, <a href="#rfc.xref.Part1.4">1.2.1</a>, <a href="#rfc.xref.Part1.5">1.2. 2</a>, <a href="#rfc.xref.Part1.6">8</a>, <a href="#Part1"><b>9.1</b></a><ul>1483 <li><em>Part1</em> <a href="#rfc.xref.Part1.1">1.2</a>, <a href="#rfc.xref.Part1.2">1.2.1</a>, <a href="#rfc.xref.Part1.3">1.2.1</a>, <a href="#rfc.xref.Part1.4">1.2.1</a>, <a href="#rfc.xref.Part1.5">1.2.1</a>, <a href="#rfc.xref.Part1.6">8</a>, <a href="#Part1"><b>9.1</b></a><ul> 1484 1484 <li><em>Section 1.2</em> <a href="#rfc.xref.Part1.1">1.2</a></li> 1485 1485 <li><em>Section 1.2.2</em> <a href="#rfc.xref.Part1.3">1.2.1</a></li> 1486 1486 <li><em>Section 3.2.3</em> <a href="#rfc.xref.Part1.4">1.2.1</a></li> 1487 <li><em>Section 6.1</em> <a href="#rfc.xref.Part1.5">1.2. 2</a></li>1487 <li><em>Section 6.1</em> <a href="#rfc.xref.Part1.5">1.2.1</a></li> 1488 1488 <li><em>Section 12</em> <a href="#rfc.xref.Part1.6">8</a></li> 1489 1489 </ul> -
draft-ietf-httpbis/latest/p5-range.xml
r1396 r1397 289 289 <x:anchor-alias value="token"/> 290 290 <x:anchor-alias value="OWS"/> 291 <x:anchor-alias value="HTTP-date"/> 291 292 <t> 292 293 The core rules below are defined in <xref target="Part1"/>: … … 295 296 <x:ref>OWS</x:ref> = <OWS, defined in &basic-rules;> 296 297 <x:ref>token</x:ref> = <token, defined in &field-rules;> 298 <x:ref>HTTP-date</x:ref> = <HTTP-date, defined in &full-date;> 297 299 </artwork></figure> 298 300 </section> … … 300 302 <section title="ABNF Rules defined in other Parts of the Specification" anchor="abnf.dependencies"> 301 303 <x:anchor-alias value="entity-tag"/> 302 <x:anchor-alias value="HTTP-date"/>303 304 <t> 304 305 The ABNF rules below are defined in other parts: 305 306 </t> 306 <figure><!--Part1--><artwork type="abnf2616">307 <x:ref>HTTP-date</x:ref> = <HTTP-date, defined in &full-date;>308 </artwork></figure>309 307 <figure><!--Part4--><artwork type="abnf2616"> 310 308 <x:ref>entity-tag</x:ref> = <entity-tag, defined in &entity-tags;>
Note: See TracChangeset
for help on using the changeset viewer.