Changeset 355 for draft-ietf-httpbis/latest-roy
- Timestamp:
- 13/11/08 00:21:26 (14 years ago)
- Location:
- draft-ietf-httpbis/latest-roy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest-roy/p5-range.html
r348 r355 368 368 <link rel="Chapter" title="3 Range Units" href="#rfc.section.3"> 369 369 <link rel="Chapter" title="4 Status Code Definitions" href="#rfc.section.4"> 370 <link rel="Chapter" title="5 Combining ByteRanges" href="#rfc.section.5">370 <link rel="Chapter" title="5 Combining Ranges" href="#rfc.section.5"> 371 371 <link rel="Chapter" title="6 Header Field Definitions" href="#rfc.section.6"> 372 372 <link rel="Chapter" title="7 IANA Considerations" href="#rfc.section.7"> … … 377 377 <link rel="Appendix" title="B Compatibility with Previous Versions" href="#rfc.section.B"> 378 378 <link rel="Appendix" title="C Change Log (to be removed by RFC Editor before publication)" href="#rfc.section.C"> 379 <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.400, 2008-10-10 14:04:14, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/">379 <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.400, 2008-10-10 14:04:14, XSLT vendor: SAXON 8.9.0.4 from Saxonica http://www.saxonica.com/"> 380 380 <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"> 381 381 <meta name="DC.Creator" content="Fielding, R."> … … 473 473 <tr> 474 474 <td class="header left"></td> 475 <td class="header right">November 1 2, 2008</td>475 <td class="header right">November 13, 2008</td> 476 476 </tr> 477 477 </table> … … 520 520 </ul> 521 521 </li> 522 <li class="tocline0">5. <a href="#combining.byte.ranges">Combining ByteRanges</a></li>522 <li class="tocline0">5. <a href="#combining.byte.ranges">Combining Ranges</a></li> 523 523 <li class="tocline0">6. <a href="#header.fields">Header Field Definitions</a><ul class="toc"> 524 524 <li class="tocline1">6.1 <a href="#header.accept-ranges">Accept-Ranges</a></li> … … 625 625 <p id="rfc.section.4.1.p.3">If the 206 response is the result of an If-Range request, the response <em class="bcp14">SHOULD NOT</em> include other entity-headers. Otherwise, the response <em class="bcp14">MUST</em> include all of the entity-headers that would have been returned with a 200 (OK) response to the same request. 626 626 </p> 627 <p id="rfc.section.4.1.p.4">A cache <em class="bcp14">MUST NOT</em> combine a 206 response with other previously cached content if the ETag or Last-Modified headers do not match exactly, see <a href="#combining.byte.ranges" title="Combining ByteRanges">Section 5</a>.628 </p> 629 <p id="rfc.section.4.1.p.5">A cache that does not support the Range and Content-Range headers <em class="bcp14">MUST NOT</em> cache 206 (Partial Content) responses.627 <p id="rfc.section.4.1.p.4">A cache <em class="bcp14">MUST NOT</em> combine a 206 response with other previously cached content if the ETag or Last-Modified headers do not match exactly, see <a href="#combining.byte.ranges" title="Combining Ranges">Section 5</a>. 628 </p> 629 <p id="rfc.section.4.1.p.5">A cache that does not support the Range and Content-Range headers or the range unit <em class="bcp14">MUST NOT</em> cache 206 (Partial Content) responses. 630 630 </p> 631 631 <div id="rfc.iref.4"></div> 632 632 <div id="rfc.iref.s.2"></div> 633 633 <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a> <a id="status.416" href="#status.416">416 Requested Range Not Satisfiable</a></h2> 634 <p id="rfc.section.4.2.p.1">A server <em class="bcp14">SHOULD</em> return a response with this status code if a request included a Range request-header field (<a href="#header.range" id="rfc.xref.header.range.3" title="Range">Section 6.4</a>), and none of the range -specifier values in this field overlap the current extent of the selected resource, and the request634 <p id="rfc.section.4.2.p.1">A server <em class="bcp14">SHOULD</em> return a response with this status code if a request included a Range request-header field (<a href="#header.range" id="rfc.xref.header.range.3" title="Range">Section 6.4</a>), and none of the ranges-specifier values in this field overlap the current extent of the selected resource, and the request 635 635 did not include an If-Range request-header field. (For byte-ranges, this means that the first-byte-pos of all of the byte-range-spec 636 636 values were greater than the current length of the selected resource.) … … 638 638 <p id="rfc.section.4.2.p.2">When this status code is returned for a byte-range request, the response <em class="bcp14">SHOULD</em> include a Content-Range entity-header field specifying the current length of the selected resource (see <a href="#header.content-range" id="rfc.xref.header.content-range.3" title="Content-Range">Section 6.2</a>). This response <em class="bcp14">MUST NOT</em> use the multipart/byteranges content-type. 639 639 </p> 640 <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a id="combining.byte.ranges" href="#combining.byte.ranges">Combining ByteRanges</a></h1>641 <p id="rfc.section.5.p.1">A response might transfer only a subrange of the bytes of an entity-body, either because the request included one or more642 Range specifications, or because a connection was broken prematurely. After several such transfers, a cache might have received643 several ranges ofthe same entity-body.640 <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a id="combining.byte.ranges" href="#combining.byte.ranges">Combining Ranges</a></h1> 641 <p id="rfc.section.5.p.1">A response might transfer only a subrange of an entity-body, either the request included one or more Range specifications, 642 or because a connection was broken prematurely. After several such transfers, a cache might have received several ranges of 643 the same entity-body. 644 644 </p> 645 645 <p id="rfc.section.5.p.2">If a cache has a stored non-empty set of subranges for an entity, and an incoming response transfers another subrange, the … … 668 668 </p> 669 669 <div id="rfc.figure.u.7"></div><pre class="text"> Accept-Ranges: bytes 670 </pre><p id="rfc.section.6.1.p.5">but are not required to do so. Clients <em class="bcp14">MAY</em> generate byte-range requests without having received this header for the resource involved. Range units are defined in <a href="#range.units" title="Range Units">Section 3</a>.670 </pre><p id="rfc.section.6.1.p.5">but are not required to do so. Clients <em class="bcp14">MAY</em> generate range requests without having received this header for the resource involved. Range units are defined in <a href="#range.units" title="Range Units">Section 3</a>. 671 671 </p> 672 672 <p id="rfc.section.6.1.p.6">Servers that do not accept any kind of range request for a resource <em class="bcp14">MAY</em> send … … 682 682 <div id="rfc.figure.u.9"></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> = "Content-Range" ":" <a href="#header.content-range" class="smpl">content-range-spec</a> 683 683 684 <a href="#header.content-range" class="smpl">content-range-spec</a> = <a href="#header.content-range" class="smpl">byte-content-range-spec</a> 685 <a href="#header.content-range" class="smpl">byte-content-range-spec</a> = <a href="#range.units" class="smpl">bytes-unit</a> <a href="#notation" class="smpl">SP</a> 686 <a href="#header.content-range" class="smpl">byte-range-resp-spec</a> "/" 687 ( <a href="#header.content-range" class="smpl">instance-length</a> / "*" ) 684 <a href="#header.content-range" class="smpl">content-range-spec</a> = <a href="#header.content-range" class="smpl">byte-content-range-spec</a> 685 / <a href="#header.content-range" class="smpl">other-content-range-spec</a> 686 <a href="#header.content-range" class="smpl">byte-content-range-spec</a> = <a href="#range.units" class="smpl">bytes-unit</a> <a href="#notation" class="smpl">SP</a> 687 <a href="#header.content-range" class="smpl">byte-range-resp-spec</a> "/" 688 ( <a href="#header.content-range" class="smpl">instance-length</a> / "*" ) 688 689 689 <a href="#header.content-range" class="smpl">byte-range-resp-spec</a> = (<a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> "-" <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a>)690 / "*"690 <a href="#header.content-range" class="smpl">byte-range-resp-spec</a> = (<a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> "-" <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a>) 691 / "*" 691 692 692 <a href="#header.content-range" class="smpl">instance-length</a> = 1*<a href="#notation" class="smpl">DIGIT</a> 693 <a href="#header.content-range" class="smpl">instance-length</a> = 1*<a href="#notation" class="smpl">DIGIT</a> 694 695 <a href="#header.content-range" class="smpl">other-content-range-spec</a> = <a href="#range.units" class="smpl">other-range-unit</a> <a href="#notation" class="smpl">SP</a> 696 <a href="#header.content-range" class="smpl">other-range-resp-spec</a> 697 <a href="#header.content-range" class="smpl">other-range-resp-spec</a> = *<a href="#notation" class="smpl">CHAR</a> 693 698 </pre><p id="rfc.section.6.2.p.3">The header <em class="bcp14">SHOULD</em> indicate the total length of the full entity-body, unless this length is unknown or difficult to determine. The asterisk "*" 694 699 character means that the instance-length is unknown at the time when the response was generated. … … 699 704 whose instance-length value is less than or equal to its last-byte-pos value, is invalid. The recipient of an invalid byte-content-range-spec <em class="bcp14">MUST</em> ignore it and any content transferred along with it. 700 705 </p> 701 <p id="rfc.section.6.2.p.6"> A server sending a response with status code 416 (Requested range not satisfiable) <em class="bcp14">SHOULD</em> include a Content-Range field with a byte-range-resp-spec of "*". The instance-length specifies the current length of the706 <p id="rfc.section.6.2.p.6">In the case of a byte range request: A server sending a response with status code 416 (Requested range not satisfiable) <em class="bcp14">SHOULD</em> include a Content-Range field with a byte-range-resp-spec of "*". The instance-length specifies the current length of the 702 707 selected resource. A response with status code 206 (Partial Content) <em class="bcp14">MUST NOT</em> include a Content-Range field with a byte-range-resp-spec of "*". 703 708 </p> … … 731 736 as defined in <a href="#internet.media.type.multipart.byteranges" title="Internet Media Type multipart/byteranges">Appendix A</a>. See <a href="#changes.from.rfc.2068" title="Changes from RFC 2068">Appendix B.1</a> for a compatibility issue. 732 737 </p> 733 <p id="rfc.section.6.2.p.11">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 byte-ranges in a single request.738 <p id="rfc.section.6.2.p.11">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. 734 739 </p> 735 740 <p id="rfc.section.6.2.p.12">When a client requests multiple byte-ranges in one request, the server <em class="bcp14">SHOULD</em> return them in the order that they appeared in the request. … … 774 779 <p id="rfc.section.6.4.1.p.2">Byte range specifications in HTTP apply to the sequence of bytes in the entity-body (not necessarily the same as the message-body).</p> 775 780 <div id="rule.ranges-specifier"> 776 <p id="rfc.section.6.4.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 entity.781 <p id="rfc.section.6.4.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 entity. 777 782 </p> 778 783 </div> 779 <div id="rfc.figure.u.16"></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">ranges-specifier</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> 780 <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> 784 <div id="rfc.figure.u.16"></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> 781 785 <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> ) 782 786 <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>] … … 795 799 <p id="rfc.section.6.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 entity.</p> 796 800 <div id="rfc.figure.u.17"></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> 797 <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> = 1*<a href="#notation" class="smpl">DIGIT</a>801 <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> = 1*<a href="#notation" class="smpl">DIGIT</a> 798 802 </pre><p id="rfc.section.6.4.1.p.10">A suffix-byte-range-spec is used to specify the suffix of the entity-body, of a length given by the suffix-length value. (That 799 803 is, this form specifies the last N bytes of an entity-body.) If the entity is shorter than the specified suffix-length, the … … 819 823 </p> 820 824 <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.20"></span> <a href="#range.retrieval.requests" class="smpl">Range</a> = "Range" ":" <a href="#rule.ranges-specifier" class="smpl">ranges-specifier</a> 825 <a href="#rule.ranges-specifier" class="smpl">ranges-specifier</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> 826 / <a href="#rule.ranges-specifier" class="smpl">other-ranges-specifier</a> 827 <a href="#rule.ranges-specifier" class="smpl">other-ranges-specifier</a> = 1*<a href="#notation" class="smpl">CHAR</a> 821 828 </pre><p id="rfc.section.6.4.2.p.3">A server <em class="bcp14">MAY</em> ignore the Range header. However, HTTP/1.1 origin servers and intermediate caches ought to support byte ranges when possible, 822 829 since Range supports efficient recovery from partially failed transfers, and supports efficient partial retrieval of large -
draft-ietf-httpbis/latest-roy/p5-range.xml
r345 r355 252 252 253 253 <section title="Notational Conventions and Generic Grammar" anchor="notation"> 254 <x:anchor-alias value="CHAR"/> 254 255 <x:anchor-alias value="DIGIT"/> 255 256 <x:anchor-alias value="SP"/> … … 354 355 </t> 355 356 <t> 356 A cache that does not support the Range and Content-Range headers 357 &MUST-NOT; cache 206 (Partial Content) responses.357 A cache that does not support the Range and Content-Range headers or 358 the range unit &MUST-NOT; cache 206 (Partial Content) responses. 358 359 </t> 359 360 </section> … … 365 366 A server &SHOULD; return a response with this status code if a request 366 367 included a Range request-header field (<xref target="header.range"/>), and none of 367 the range -specifier values in this field overlap the current extent368 the ranges-specifier values in this field overlap the current extent 368 369 of the selected resource, and the request did not include an If-Range 369 370 request-header field. (For byte-ranges, this means that the first-byte-pos … … 380 381 </section> 381 382 382 <section title="Combining ByteRanges" anchor="combining.byte.ranges">383 <t> 384 A response might transfer only a subrange of the bytes of an entity-body,385 either because the request included one or more Range386 specifications, or because a connection was broken prematurely. After387 several such transfers, a cache might have received several ranges of388 the same entity-body.383 <section title="Combining Ranges" anchor="combining.byte.ranges"> 384 <t> 385 A response might transfer only a subrange of an entity-body, either 386 the request included one or more Range specifications, or because 387 a connection was broken prematurely. 388 After several such transfers, a cache might have received several 389 ranges of the same entity-body. 389 390 </t> 390 391 <t> … … 438 439 </artwork></figure> 439 440 <t> 440 but are not required to do so. Clients &MAY; generate byte-range441 442 441 but are not required to do so. Clients &MAY; generate range 442 requests without having received this header for the resource 443 involved. Range units are defined in <xref target="range.units"/>. 443 444 </t> 444 445 <t> … … 462 463 <x:anchor-alias value="content-range-spec"/> 463 464 <x:anchor-alias value="instance-length"/> 465 <x:anchor-alias value="other-content-range-spec"/> 466 <x:anchor-alias value="other-range-resp-spec"/> 464 467 <t> 465 468 The Content-Range entity-header is sent with a partial entity-body to … … 470 473 <x:ref>Content-Range</x:ref> = "Content-Range" ":" <x:ref>content-range-spec</x:ref> 471 474 472 <x:ref>content-range-spec</x:ref> = <x:ref>byte-content-range-spec</x:ref> 473 <x:ref>byte-content-range-spec</x:ref> = <x:ref>bytes-unit</x:ref> <x:ref>SP</x:ref> 474 <x:ref>byte-range-resp-spec</x:ref> "/" 475 ( <x:ref>instance-length</x:ref> / "*" ) 475 <x:ref>content-range-spec</x:ref> = <x:ref>byte-content-range-spec</x:ref> 476 / <x:ref>other-content-range-spec</x:ref> 477 <x:ref>byte-content-range-spec</x:ref> = <x:ref>bytes-unit</x:ref> <x:ref>SP</x:ref> 478 <x:ref>byte-range-resp-spec</x:ref> "/" 479 ( <x:ref>instance-length</x:ref> / "*" ) 476 480 477 <x:ref>byte-range-resp-spec</x:ref> = (<x:ref>first-byte-pos</x:ref> "-" <x:ref>last-byte-pos</x:ref>)478 / "*"481 <x:ref>byte-range-resp-spec</x:ref> = (<x:ref>first-byte-pos</x:ref> "-" <x:ref>last-byte-pos</x:ref>) 482 / "*" 479 483 480 <x:ref>instance-length</x:ref> = 1*<x:ref>DIGIT</x:ref> 484 <x:ref>instance-length</x:ref> = 1*<x:ref>DIGIT</x:ref> 485 486 <x:ref>other-content-range-spec</x:ref> = <x:ref>other-range-unit</x:ref> <x:ref>SP</x:ref> 487 <x:ref>other-range-resp-spec</x:ref> 488 <x:ref>other-range-resp-spec</x:ref> = *<x:ref>CHAR</x:ref> 481 489 </artwork></figure> 482 490 <t> … … 500 508 </t> 501 509 <t> 502 A server sending a response with status code 416 (Requested range not 503 satisfiable) &SHOULD; include a Content-Range field with a byte-range-resp-spec 504 of "*". The instance-length specifies the current length of 505 the selected resource. A response with status code 206 (Partial 506 Content) &MUST-NOT; include a Content-Range field with a byte-range-resp-spec of "*". 510 In the case of a byte range request: A server sending a response with 511 status code 416 (Requested range not satisfiable) &SHOULD; include a 512 Content-Range field with a byte-range-resp-spec of "*". 513 The instance-length specifies the current length of the selected resource. 514 A response with status code 206 (Partial Content) &MUST-NOT; include a 515 Content-Range field with a byte-range-resp-spec of "*". 507 516 </t> 508 517 <t> … … 564 573 multipart/byteranges media type with one part. A client that cannot 565 574 decode a multipart/byteranges message &MUST-NOT; ask for multiple 566 byte-ranges in a single request.575 ranges in a single request. 567 576 </t> 568 577 <t> … … 657 666 <x:anchor-alias value="suffix-byte-range-spec"/> 658 667 <x:anchor-alias value="suffix-length"/> 668 <x:anchor-alias value="other-ranges-specifier"/> 669 659 670 A byte range operation &MAY; specify a single range of bytes, or a set 660 671 of ranges within a single entity. 661 672 </t> 662 673 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="ranges-specifier"/><iref primary="true" item="Grammar" subitem="byte-ranges-specifier"/><iref primary="true" item="Grammar" subitem="byte-range-set"/><iref primary="true" item="Grammar" subitem="byte-range-spec"/><iref primary="true" item="Grammar" subitem="first-byte-pos"/><iref primary="true" item="Grammar" subitem="last-byte-pos"/> 663 <x:ref>ranges-specifier</x:ref> = <x:ref>byte-ranges-specifier</x:ref>664 674 <x:ref>byte-ranges-specifier</x:ref> = <x:ref>bytes-unit</x:ref> "=" <x:ref>byte-range-set</x:ref> 665 675 <x:ref>byte-range-set</x:ref> = 1#( <x:ref>byte-range-spec</x:ref> / <x:ref>suffix-byte-range-spec</x:ref> ) … … 693 703 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="suffix-byte-range-spec"/><iref primary="true" item="Grammar" subitem="suffix-length"/> 694 704 <x:ref>suffix-byte-range-spec</x:ref> = "-" <x:ref>suffix-length</x:ref> 695 <x:ref>suffix-length</x:ref> = 1*<x:ref>DIGIT</x:ref>705 <x:ref>suffix-length</x:ref> = 1*<x:ref>DIGIT</x:ref> 696 706 </artwork></figure> 697 707 <t> … … 748 758 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Range"/> 749 759 <x:ref>Range</x:ref> = "Range" ":" <x:ref>ranges-specifier</x:ref> 760 <x:ref>ranges-specifier</x:ref> = <x:ref>byte-ranges-specifier</x:ref> 761 / <x:ref>other-ranges-specifier</x:ref> 762 <x:ref>other-ranges-specifier</x:ref> = 1*<x:ref>CHAR</x:ref> 750 763 </artwork></figure> 751 764 <t>
Note: See TracChangeset
for help on using the changeset viewer.