Changeset 135 for draft-ietf-httpbis/latest/p5-range.html
- Timestamp:
- 01/01/08 17:15:17 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p5-range.html
r131 r135 537 537 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. An entity can be broken down into subranges according to various structural units. 538 538 </p> 539 <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> 540 541 539 <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> range-unit = bytes-unit | other-range-unit 540 bytes-unit = "bytes" 541 other-range-unit = token 542 542 </pre><p id="rfc.section.2.p.3">The only range unit defined by HTTP/1.1 is "bytes". HTTP/1.1 implementations <em class="bcp14">MAY</em> ignore ranges specified using other units. 543 543 </p> … … 602 602 <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> 603 603 <p id="rfc.section.5.1.p.1">The Accept-Ranges response-header field allows the server to indicate its acceptance of range requests for a resource:</p> 604 <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span> 605 604 <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span> Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges 605 acceptable-ranges = 1#range-unit | "none" 606 606 </pre><p id="rfc.section.5.1.p.3">Origin servers that accept byte-range requests <em class="bcp14">MAY</em> send 607 607 </p> … … 619 619 should be applied. Range units are defined in <a href="#range.units" title="Range Units">Section 2</a>. 620 620 </p> 621 <div id="rfc.figure.u.5"></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> 622 623 624 625 626 627 628 629 630 621 <div id="rfc.figure.u.5"></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> Content-Range = "Content-Range" ":" content-range-spec 622 623 content-range-spec = byte-content-range-spec 624 byte-content-range-spec = bytes-unit SP 625 byte-range-resp-spec "/" 626 ( instance-length | "*" ) 627 628 byte-range-resp-spec = (first-byte-pos "-" last-byte-pos) 629 | "*" 630 instance-length = 1*DIGIT 631 631 </pre><p id="rfc.section.5.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 "*" 632 632 character means that the instance-length is unknown at the time when the response was generated. … … 696 696 send me the part(s) that I am missing; otherwise, send me the entire new entity'. 697 697 </p> 698 <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.11"></span> 698 <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.11"></span> If-Range = "If-Range" ":" ( entity-tag | HTTP-date ) 699 699 </pre><p id="rfc.section.5.3.p.4">If the client has no entity tag for an entity, but does have a Last-Modified date, it <em class="bcp14">MAY</em> use that date in an If-Range header. (The server can distinguish between a valid HTTP-date and any form of entity-tag by examining 700 700 no more than two characters.) The If-Range header <em class="bcp14">SHOULD</em> only be used together with a Range header, and <em class="bcp14">MUST</em> be ignored if the request does not include a Range header, or if the server does not support the sub-range operation. … … 713 713 <p id="rfc.section.5.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. 714 714 </p> 715 <div id="rfc.figure.u.12"></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> 716 717 718 719 720 715 <div id="rfc.figure.u.12"></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> ranges-specifier = byte-ranges-specifier 716 byte-ranges-specifier = bytes-unit "=" byte-range-set 717 byte-range-set = 1#( byte-range-spec | suffix-byte-range-spec ) 718 byte-range-spec = first-byte-pos "-" [last-byte-pos] 719 first-byte-pos = 1*DIGIT 720 last-byte-pos = 1*DIGIT 721 721 </pre><p id="rfc.section.5.4.1.p.5">The first-byte-pos value in a byte-range-spec gives the byte-offset of the first byte in a range. The last-byte-pos value 722 722 gives the byte-offset of the last byte in the range; that is, the byte positions specified are inclusive. Byte offsets start … … 730 730 </p> 731 731 <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 entity.</p> 732 <div id="rfc.figure.u.13"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span> 733 732 <div id="rfc.figure.u.13"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span> suffix-byte-range-spec = "-" suffix-length 733 suffix-length = 1*DIGIT 734 734 </pre><p id="rfc.section.5.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 735 735 is, this form specifies the last N bytes of an entity-body.) If the entity is shorter than the specified suffix-length, the … … 754 754 to the entity returned as the result of the request: 755 755 </p> 756 <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.20"></span> 756 <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.20"></span> Range = "Range" ":" ranges-specifier 757 757 </pre><p id="rfc.section.5.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, 758 758 since Range supports efficient recovery from partially failed transfers, and supports efficient partial retrieval of large
Note: See TracChangeset
for help on using the changeset viewer.