Changeset 994 for draft-ietf-httpbis/latest/p5-range.html
- Timestamp:
- 07/09/10 11:46:12 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p5-range.html
r981 r994 400 400 <meta name="dct.creator" content="Reschke, J. F."> 401 401 <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p5-range-latest"> 402 <meta name="dct.issued" scheme="ISO8601" content="2010-09-0 1">402 <meta name="dct.issued" scheme="ISO8601" content="2010-09-07"> 403 403 <meta name="dct.replaces" content="urn:ietf:rfc:2616"> 404 404 <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 5 of the seven-part specification that defines the protocol referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616. Part 5 defines range-specific requests and the rules for constructing and combining responses to those requests."> … … 426 426 </tr> 427 427 <tr> 428 <td class="left">Expires: March 5, 2011</td>428 <td class="left">Expires: March 11, 2011</td> 429 429 <td class="right">J. Mogul</td> 430 430 </tr> … … 483 483 <tr> 484 484 <td class="left"></td> 485 <td class="right">September 1, 2010</td>485 <td class="right">September 7, 2010</td> 486 486 </tr> 487 487 </tbody> … … 509 509 in progress”. 510 510 </p> 511 <p>This Internet-Draft will expire on March 5, 2011.</p>511 <p>This Internet-Draft will expire on March 11, 2011.</p> 512 512 <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1> 513 513 <p>Copyright © 2010 IETF Trust and the persons identified as the document authors. All rights reserved.</p> … … 645 645 unit defined by HTTP/1.1 is "bytes". Additional specifiers can be defined as described in <a href="#range.specifier.registry" title="Range Specifier Registry">Section 2.1</a>. 646 646 </p> 647 <p id="rfc.section.2.p.4">If a range unit is not understood in a request, a server <em class="bcp14">MUST</em> ignore the whole Range header (<a href="#header.range" id="rfc.xref.header.range.2" title="Range">Section 5.4</a>). If a range unit is not understood in a response, an intermediary <em class="bcp14">SHOULD</em> pass the response to the client; a client <em class="bcp14">MUST</em> fail.647 <p id="rfc.section.2.p.4">If a range unit is not understood in a request, a server <em class="bcp14">MUST</em> ignore the whole Range header field (<a href="#header.range" id="rfc.xref.header.range.2" title="Range">Section 5.4</a>). If a range unit is not understood in a response, an intermediary <em class="bcp14">SHOULD</em> pass the response to the client; a client <em class="bcp14">MUST</em> fail. 648 648 </p> 649 649 <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a> <a id="range.specifier.registry" href="#range.specifier.registry">Range Specifier Registry</a></h2> … … 679 679 <p id="rfc.section.3.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 representation header fields. Otherwise, the response <em class="bcp14">MUST</em> include all of the representation header fields that would have been returned with a 200 (OK) response to the same request. 680 680 </p> 681 <p id="rfc.section.3.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 4</a>. 682 </p> 683 <p id="rfc.section.3.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. Furthermore, if a response uses a range unit that is not understood by the cache, then 681 <p id="rfc.section.3.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 header fields do not match exactly, 682 see <a href="#combining.byte.ranges" title="Combining Ranges">Section 4</a>. 683 </p> 684 <p id="rfc.section.3.1.p.5">A cache that does not support the Range and Content-Range header fields <em class="bcp14">MUST NOT</em> cache 206 (Partial Content) responses. Furthermore, if a response uses a range unit that is not understood by the cache, then 684 685 it <em class="bcp14">MUST NOT</em> be cached either. 685 686 </p> … … 721 722 </p> 722 723 <div id="rfc.figure.u.6"></div><pre class="text"> Accept-Ranges: bytes 723 </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 f or the resource involved. Range units are defined in <a href="#range.units" title="Range Units">Section 2</a>.724 </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>. 724 725 </p> 725 726 <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 … … 752 753 <a href="#header.content-range" class="smpl">other-range-resp-spec</a> 753 754 <a href="#header.content-range" class="smpl">other-range-resp-spec</a> = *<a href="#notation" class="smpl">CHAR</a> 754 </pre><p id="rfc.section.5.2.p.4">The header <em class="bcp14">SHOULD</em> indicate the total length of the full representation, unless this length is unknown or difficult to determine. The asterisk755 </pre><p id="rfc.section.5.2.p.4">The header field <em class="bcp14">SHOULD</em> indicate the total length of the full representation, unless this length is unknown or difficult to determine. The asterisk 755 756 "*" character means that the instance-length is unknown at the time when the response was generated. 756 757 </p> … … 779 780 </ul> 780 781 <p id="rfc.section.5.2.p.9">When an HTTP message includes the content of a single range (for example, a response to a request for a single range, or to 781 a request for a set of ranges that overlap without any holes), this content is transmitted with a Content-Range header , and782 a Content-Length headershowing the number of bytes actually transferred. For example,782 a request for a set of ranges that overlap without any holes), this content is transmitted with a Content-Range header field, 783 and a Content-Length header field showing the number of bytes actually transferred. For example, 783 784 </p> 784 785 <div id="rfc.figure.u.13"></div><pre class="text"> HTTP/1.1 206 Partial Content … … 805 806 <div class="note" id="rfc.section.5.2.p.16"> 806 807 <p> <b>Note:</b> Clients cannot depend on servers to send a 416 (Requested range not satisfiable) response instead of a 200 (OK) response for 807 an unsatisfiable Range request-header , since not all servers implement this request-header.808 an unsatisfiable Range request-header field, since not all servers implement this request-header field. 808 809 </p> 809 810 </div> … … 812 813 <h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a> <a id="header.if-range" href="#header.if-range">If-Range</a></h2> 813 814 <p id="rfc.section.5.3.p.1">If a client has a partial copy of a representation in its cache, and wishes to have an up-to-date copy of the entire representation 814 in its cache, it could use the Range request-header with a conditional GET (using either or both of If-Unmodified-Since and815 If-Match.) However, if the condition fails because the representation has been modified, the client would then have to make816 a second request to obtain the entire current representation.815 in its cache, it could use the Range request-header field with a conditional GET (using either or both of If-Unmodified-Since 816 and If-Match.) However, if the condition fails because the representation has been modified, the client would then have to 817 make a second request to obtain the entire current representation. 817 818 </p> 818 819 <p id="rfc.section.5.3.p.2">The "If-Range" request-header field allows a client to "short-circuit" the second request. Informally, its meaning is "if … … 821 822 <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.13"></span><span id="rfc.iref.g.14"></span> <a href="#header.if-range" class="smpl">If-Range</a> = "If-Range" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.if-range" class="smpl">If-Range-v</a> 822 823 <a href="#header.if-range" class="smpl">If-Range-v</a> = <a href="#abnf.dependencies" class="smpl">entity-tag</a> / <a href="#abnf.dependencies" class="smpl">HTTP-date</a> 823 </pre><p id="rfc.section.5.3.p.4">If the client has no entity-tag for a representation, 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 824 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. 825 </p> 826 <p id="rfc.section.5.3.p.5">If the entity-tag given in the If-Range header matches the current cache validator for the representation, then the server <em class="bcp14">SHOULD</em> provide the specified sub-range of the representation using a 206 (Partial Content) response. If the cache validator does 824 </pre><p id="rfc.section.5.3.p.4">If the client has no entity-tag for a representation, but does have a Last-Modified date, it <em class="bcp14">MAY</em> use that date in an If-Range header field. (The server can distinguish between a valid HTTP-date and any form of entity-tag 825 by examining no more than two characters.) The If-Range header field <em class="bcp14">SHOULD</em> only be used together with a Range header field, and <em class="bcp14">MUST</em> be ignored if the request does not include a Range header field, or if the server does not support the sub-range operation. 826 </p> 827 <p id="rfc.section.5.3.p.5">If the entity-tag given in the If-Range header field matches the current cache validator for the representation, then the 828 server <em class="bcp14">SHOULD</em> provide the specified sub-range of the representation using a 206 (Partial Content) response. If the cache validator does 827 829 not match, then the server <em class="bcp14">SHOULD</em> return the entire representation using a 200 (OK) response. 828 830 </p> … … 896 898 <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> 897 899 <a href="#range.retrieval.requests" class="smpl">other-range-set</a> = 1*<a href="#notation" class="smpl">CHAR</a> 898 </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,899 since Range supports efficient recovery from partially failed transfers, and supports efficient partial retrieval of large900 representations.901 </p> 902 <p id="rfc.section.5.4.2.p.4">If the server supports the Range header and the specified range or ranges are appropriate for the representation: </p>903 <ul> 904 <li>The presence of a Range header in an unconditional GET modifies what is returned if the GET is otherwise successful. In other905 words, the response carries a status code of 206 (Partial Content) instead of 200 (OK).906 </li> 907 <li>The presence of a Range header in a conditional GET (a request using one or both of If-Modified-Since and If-None-Match, or908 o ne or both of If-Unmodified-Since and If-Match) modifies what is returned if the GET is otherwise successful and the condition900 </pre><p id="rfc.section.5.4.2.p.3">A server <em class="bcp14">MAY</em> ignore the Range header field. However, HTTP/1.1 origin servers and intermediate caches ought to support byte ranges when 901 possible, since Range supports efficient recovery from partially failed transfers, and supports efficient partial retrieval 902 of large representations. 903 </p> 904 <p id="rfc.section.5.4.2.p.4">If the server supports the Range header field and the specified range or ranges are appropriate for the representation: </p> 905 <ul> 906 <li>The presence of a Range header field in an unconditional GET modifies what is returned if the GET is otherwise successful. 907 In other words, the response carries a status code of 206 (Partial Content) instead of 200 (OK). 908 </li> 909 <li>The presence of a Range header field in a conditional GET (a request using one or both of If-Modified-Since and If-None-Match, 910 or one or both of If-Unmodified-Since and If-Match) modifies what is returned if the GET is otherwise successful and the condition 909 911 is true. It does not affect the 304 (Not Modified) response returned if the conditional is false. 910 912 </li> 911 913 </ul> 912 <p id="rfc.section.5.4.2.p.5">In some cases, it might be more appropriate to use the If-Range header (see <a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section 5.3</a>) in addition to the Range header.914 <p id="rfc.section.5.4.2.p.5">In some cases, it might be more appropriate to use the If-Range header field (see <a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section 5.3</a>) in addition to the Range header field. 913 915 </p> 914 916 <p id="rfc.section.5.4.2.p.6">If a proxy that supports ranges receives a Range request, forwards the request to an inbound server, and receives an entire … … 1287 1289 </ul> 1288 1290 <h2 id="rfc.section.D.4"><a href="#rfc.section.D.4">D.4</a> <a id="changes.since.02" href="#changes.since.02">Since draft-ietf-httpbis-p5-range-02</a></h2> 1289 <p id="rfc.section.D.4.p.1">Ongoing work on IANA Message Header Registration (<<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/40">http://tools.ietf.org/wg/httpbis/trac/ticket/40</a>>):1290 </p> 1291 <ul> 1292 <li>Reference RFC 3984, and update header registrations for headers defined in this document.</li>1291 <p id="rfc.section.D.4.p.1">Ongoing work on IANA Message Header Field Registration (<<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/40">http://tools.ietf.org/wg/httpbis/trac/ticket/40</a>>): 1292 </p> 1293 <ul> 1294 <li>Reference RFC 3984, and update header field registrations for headers defined in this document.</li> 1293 1295 </ul> 1294 1296 <h2 id="rfc.section.D.5"><a href="#rfc.section.D.5">D.5</a> <a id="changes.since.03" href="#changes.since.03">Since draft-ietf-httpbis-p5-range-03</a></h2> … … 1304 1306 <li>Use "/" instead of "|" for alternatives.</li> 1305 1307 <li>Introduce new ABNF rules for "bad" whitespace ("BWS"), optional whitespace ("OWS") and required whitespace ("RWS").</li> 1306 <li>Rewrite ABNFs to spell out whitespace rules, factor out header value format definitions.</li>1308 <li>Rewrite ABNFs to spell out whitespace rules, factor out header field value format definitions.</li> 1307 1309 </ul> 1308 1310 <h2 id="rfc.section.D.7"><a href="#rfc.section.D.7">D.7</a> <a id="changes.since.05" href="#changes.since.05">Since draft-ietf-httpbis-p5-range-05</a></h2>
Note: See TracChangeset
for help on using the changeset viewer.