Changeset 2134 for draft-ietf-httpbis/latest
- Timestamp:
- 19/01/13 21:56:25 (10 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p5-range.html
r2126 r2134 449 449 } 450 450 @bottom-center { 451 content: "Expires July 2 1, 2013";451 content: "Expires July 23, 2013"; 452 452 } 453 453 @bottom-right { … … 493 493 <meta name="dct.creator" content="Reschke, J. F."> 494 494 <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p5-range-latest"> 495 <meta name="dct.issued" scheme="ISO8601" content="2013-01-1 7">495 <meta name="dct.issued" scheme="ISO8601" content="2013-01-19"> 496 496 <meta name="dct.replaces" content="urn:ietf:rfc:2616"> 497 497 <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypertext information systems. This document defines range requests and the rules for constructing and combining responses to those requests."> … … 519 519 </tr> 520 520 <tr> 521 <td class="left">Expires: July 2 1, 2013</td>521 <td class="left">Expires: July 23, 2013</td> 522 522 <td class="right">J. Reschke, Editor</td> 523 523 </tr> … … 528 528 <tr> 529 529 <td class="left"></td> 530 <td class="right">January 1 7, 2013</td>530 <td class="right">January 19, 2013</td> 531 531 </tr> 532 532 </tbody> … … 553 553 in progress”. 554 554 </p> 555 <p>This Internet-Draft will expire on July 2 1, 2013.</p>555 <p>This Internet-Draft will expire on July 23, 2013.</p> 556 556 <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1> 557 557 <p>Copyright © 2013 IETF Trust and the persons identified as the document authors. All rights reserved.</p> … … 585 585 </ul> 586 586 </li> 587 <li><a href="#rfc.section.4">4.</a> <a href="#r fc.section.4">Responses to a Range Request</a><ul>587 <li><a href="#rfc.section.4">4.</a> <a href="#range.response">Responses to a Range Request</a><ul> 588 588 <li><a href="#rfc.section.4.1">4.1</a> <a href="#rfc.section.4.1">Response to a Single and Multiple Ranges Request</a></li> 589 589 <li><a href="#rfc.section.4.2">4.2</a> <a href="#combining.byte.ranges">Combining Ranges</a></li> … … 714 714 </p> 715 715 </div> 716 <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> Responses to a Range Request 717 </h1> 716 <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> <a id="range.response" href="#range.response">Responses to a Range Request</a></h1> 718 717 <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> Response to a Single and Multiple Ranges Request 719 718 </h2> … … 823 822 </pre> </li> 824 823 </ul> 825 <p id="rfc.section.5.2.p.10">If the server ignores a byte-range-spec (for example if it is syntactically invalid, or if it might be seen as a denial-of-service826 attack), the server <em class="bcp14">SHOULD</em> treat the request as if the invalid <a href="#range.retrieval.requests" class="smpl">Range</a> header field did not exist. (Normally, this means send a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response containing the full representation).827 </p>828 824 <div id="rfc.iref.i.1"></div> 829 825 <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> … … 832 828 request to obtain the entire current representation. 833 829 </p> 834 <p id="rfc.section.5.3.p.2">The "If-Range" header field allows a client to "short-circuit" the second request. Informally, its meaning is "if the representation835 is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new representation".830 <p id="rfc.section.5.3.p.2">The "If-Range" header field allows a client to "short-circuit" the second request. Informally, its meaning is: if the representation 831 is unchanged, send me the part(s) that I am requesting in Range; otherwise, send me the entire representation. 836 832 </p> 837 833 <div id="rfc.figure.u.12"></div><pre class="inline"><span id="rfc.iref.g.10"></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> … … 909 905 </ul> 910 906 <h3 id="rfc.section.5.4.2"><a href="#rfc.section.5.4.2">5.4.2</a> <a id="range.retrieval.requests" href="#range.retrieval.requests">Range Retrieval Requests</a></h3> 911 <p id="rfc.section.5.4.2.p.1">The "Range" header field defines the GET method (conditional or not) to request one or more sub-ranges of the response representation912 data, instead ofthe entire representation data.907 <p id="rfc.section.5.4.2.p.1">The "Range" header field on a GET request modifies the method semantics to request transfer of only one or more sub-ranges 908 of the selected representation data in a successful response, rather than the entire representation data. 913 909 </p> 914 910 <div id="rfc.figure.u.21"></div><pre class="inline"><span id="rfc.iref.g.19"></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> … … 916 912 <a href="#range.retrieval.requests" class="smpl">other-range-set</a> = 1*<a href="#imported.abnf" class="smpl">CHAR</a> 917 913 </pre><p id="rfc.section.5.4.2.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, 918 since Range supports efficient recovery from partially failed transfers, and supports efficient partial retrieval of large 919 representations. 920 </p> 921 <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> 922 <ul> 923 <li>The presence of a Range header field in an unconditional GET modifies what is sent if the GET is otherwise successful. In 924 other words, the response carries a status code of <a href="#status.206" class="smpl">206 (Partial Content)</a> instead of <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a>. 925 </li> 926 <li>The presence of a Range header field in a conditional GET (a request using one or both of <a href="p4-conditional.html#header.if-modified-since" class="smpl">If-Modified-Since</a> and <a href="p4-conditional.html#header.if-none-match" class="smpl">If-None-Match</a>, or one or both of <a href="p4-conditional.html#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> and <a href="p4-conditional.html#header.if-match" class="smpl">If-Match</a>) modifies what is sent if the GET is otherwise successful and the condition is true. It does not affect the <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response sent if the conditional is false. 927 </li> 928 </ul> 929 <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. 930 </p> 931 <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 932 representation in reply, it <em class="bcp14">MAY</em> only send the requested range to its client. 914 since Range supports efficient recovery from partially failed transfers and partial retrieval of large representations. A 915 server <em class="bcp14">MUST</em> ignore a Range header field received with a request method other than GET. 916 </p> 917 <p id="rfc.section.5.4.2.p.4">The Range header field is evaluated after evaluating the preconditions of <a href="#Part4" id="rfc.xref.Part4.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a> and only if the result of their evaluation is leading toward a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response. In other words, Range is ignored when a conditional GET would result in a <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response. 918 </p> 919 <p id="rfc.section.5.4.2.p.5">The If-Range header field (<a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section 5.3</a>) can be used as a precondition to applying the Range header field. 920 </p> 921 <p id="rfc.section.5.4.2.p.6">If all of the preconditions are true, the server supports the Range header field for the target resource, the specified range(s) 922 are syntactically correct (as defined in <a href="#byte.ranges" title="Byte Ranges">Section 5.4.1</a>), and at least one of the ranges has a non-empty intersection with the current selected representation extent, then the server <em class="bcp14">MAY</em> respond with a status code of <a href="#status.206" class="smpl">206 (Partial Content)</a> and a payload containing one or more partial representations that correspond to those requested, as defined in <a href="#range.response" title="Responses to a Range Request">Section 4</a>. 933 923 </p> 934 924 <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a id="IANA.considerations" href="#IANA.considerations">IANA Considerations</a></h1> … … 1184 1174 Date: Wed, 15 Nov 1995 06:25:24 GMT 1185 1175 Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT 1186 Content-type: multipart/byteranges; boundary=THIS_STRING_SEPARATES 1176 Content-Length: 1741 1177 Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES 1187 1178 1188 1179 --THIS_STRING_SEPARATES 1189 Content- type: application/pdf1190 Content- range: bytes 500-999/80001180 Content-Type: application/pdf 1181 Content-Range: bytes 500-999/8000 1191 1182 1192 1183 ...the first range... 1193 1184 --THIS_STRING_SEPARATES 1194 Content- type: application/pdf1195 Content- range: bytes 7000-7999/80001185 Content-Type: application/pdf 1186 Content-Range: bytes 7000-7999/8000 1196 1187 1197 1188 ...the second range … … 1201 1192 Date: Tue, 14 Nov 1995 06:25:24 GMT 1202 1193 Last-Modified: Tue, 14 July 04:58:08 GMT 1203 Content-type: multipart/byteranges; boundary=THIS_STRING_SEPARATES 1194 Content-Length: 2331785 1195 Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES 1204 1196 1205 1197 --THIS_STRING_SEPARATES 1206 Content- type: video/example1207 Content- range: exampleunit 1.2-4.3/251198 Content-Type: video/example 1199 Content-Range: exampleunit 1.2-4.3/25 1208 1200 1209 1201 ...the first range... 1210 1202 --THIS_STRING_SEPARATES 1211 Content- type: video/example1212 Content- range: exampleunit 11.2-14.3/251203 Content-Type: video/example 1204 Content-Range: exampleunit 11.2-14.3/25 1213 1205 1214 1206 ...the second range … … 1248 1240 </pre><p id="rfc.section.C.p.5">The rules below are defined in other parts:</p> 1249 1241 <div id="rfc.figure.u.25"></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>> 1250 <a href="#imported.abnf" class="smpl">entity-tag</a> = <entity-tag, defined in <a href="#Part4" id="rfc.xref.Part4. 5"><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 <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>> 1251 1243 </pre><h1 id="rfc.section.D"><a href="#rfc.section.D">D.</a> <a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1> 1252 1244 <div id="rfc.figure.u.26"></div> <pre class="inline"><a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = acceptable-ranges … … 1399 1391 </ul> 1400 1392 </li> 1401 <li><em>Part4</em> <a href="#rfc.xref.Part4.1">4.2</a>, <a href="#rfc.xref.Part4.2">4.2</a>, <a href="#rfc.xref.Part4.3">5.3</a>, <a href="#rfc.xref.Part4.4">5.3</a>, <a href="# Part4"><b>9.1</b></a>, <a href="#rfc.xref.Part4.5">C</a><ul>1393 <li><em>Part4</em> <a href="#rfc.xref.Part4.1">4.2</a>, <a href="#rfc.xref.Part4.2">4.2</a>, <a href="#rfc.xref.Part4.3">5.3</a>, <a href="#rfc.xref.Part4.4">5.3</a>, <a href="#rfc.xref.Part4.5">5.4.2</a>, <a href="#Part4"><b>9.1</b></a>, <a href="#rfc.xref.Part4.6">C</a><ul> 1402 1394 <li><em>Section 2.2.2</em> <a href="#rfc.xref.Part4.2">4.2</a>, <a href="#rfc.xref.Part4.3">5.3</a>, <a href="#rfc.xref.Part4.4">5.3</a></li> 1403 <li><em>Section 2.3</em> <a href="#rfc.xref.Part4.1">4.2</a>, <a href="#rfc.xref.Part4. 5">C</a></li>1395 <li><em>Section 2.3</em> <a href="#rfc.xref.Part4.1">4.2</a>, <a href="#rfc.xref.Part4.6">C</a></li> 1404 1396 </ul> 1405 1397 </li> -
draft-ietf-httpbis/latest/p5-range.xml
r2126 r2134 325 325 </section> 326 326 327 <section title="Responses to a Range Request" >327 <section title="Responses to a Range Request" anchor="range.response"> 328 328 <section title="Response to a Single and Multiple Ranges Request"> 329 329 <t> … … 564 564 </list> 565 565 </t> 566 <t>567 If the server ignores a byte-range-spec (for example if it is568 syntactically invalid, or if it might be seen as a denial-of-service569 attack), the server &SHOULD; treat the request as if the invalid <x:ref>Range</x:ref>570 header field did not exist. (Normally, this means send a <x:ref>200 (OK)</x:ref>571 response containing the full representation).572 </t>573 566 </section> 574 567 … … 587 580 <t> 588 581 The "If-Range" header field allows a client to "short-circuit" the second 589 request. Informally, its meaning is "if the representation is unchanged, send590 me the part(s) that I am missing; otherwise, send me the entire new591 representation".582 request. Informally, its meaning is: if the representation is unchanged, 583 send me the part(s) that I am requesting in Range; otherwise, send me the 584 entire representation. 592 585 </t> 593 586 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Range"/> … … 621 614 validator for the selected representation of the target resource, then 622 615 the server &SHOULD; send the specified sub-range of the representation 623 using a <x:ref>206 (Partial Content)</x:ref> response. If the validator does not match,624 then the server &SHOULD; send the entire representation using a <x:ref>200 (OK)</x:ref>625 response.616 using a <x:ref>206 (Partial Content)</x:ref> response. If the validator 617 does not match, then the server &SHOULD; send the entire representation 618 using a <x:ref>200 (OK)</x:ref> response. 626 619 </t> 627 620 </section> … … 757 750 <x:anchor-alias value="other-range-set"/> 758 751 <t> 759 The "Range" header field defines the GET method (conditional or 760 not) to request one or more sub-ranges of the response representation data, instead 761 of the entire representation data. 752 The "Range" header field on a GET request modifies the method semantics to 753 request transfer of only one or more sub-ranges of the selected 754 representation data in a successful response, rather than the entire 755 representation data. 762 756 </t> 763 757 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Range"/> … … 767 761 </artwork></figure> 768 762 <t> 769 A server &MAY; ignore the Range header field. However, origin 770 servers and intermediate caches ought to support byte ranges when 771 possible, since Range supports efficient recovery from partially 772 failed transfers, and supports efficient partial retrieval of large 773 representations. 774 </t> 775 <t> 776 If the server supports the Range header field and the specified range or 777 ranges are appropriate for the representation: 778 <list style="symbols"> 779 <t>The presence of a Range header field in an unconditional GET modifies 780 what is sent if the GET is otherwise successful. In other 781 words, the response carries a status code of <x:ref>206 (Partial Content)</x:ref> 782 instead of <x:ref>200 (OK)</x:ref>.</t> 783 784 <t>The presence of a Range header field in a conditional GET (a request 785 using one or both of <x:ref>If-Modified-Since</x:ref> and 786 <x:ref>If-None-Match</x:ref>, or one or both of 787 <x:ref>If-Unmodified-Since</x:ref> and <x:ref>If-Match</x:ref>) modifies 788 what is sent if the GET is otherwise successful and the 789 condition is true. It does not affect the <x:ref>304 (Not Modified)</x:ref> 790 response sent if the conditional is false.</t> 791 </list> 792 </t> 793 <t> 794 In some cases, it might be more appropriate to use the If-Range 795 header field (see <xref target="header.if-range"/>) in addition to the Range 796 header field. 797 </t> 798 <t> 799 If a proxy that supports ranges receives a Range request, forwards 800 the request to an inbound server, and receives an entire representation in 801 reply, it &MAY; only send the requested range to its client. 763 A server &MAY; ignore the Range header field. However, origin servers and 764 intermediate caches ought to support byte ranges when possible, since Range 765 supports efficient recovery from partially failed transfers and partial 766 retrieval of large representations. A server &MUST; ignore a Range header 767 field received with a request method other than GET. 768 </t> 769 <t> 770 The Range header field is evaluated after evaluating the preconditions of 771 <xref target="Part4"/> and only if the result of their evaluation is 772 leading toward a <x:ref>200 (OK)</x:ref> response. In other words, Range 773 is ignored when a conditional GET would result in a 774 <x:ref>304 (Not Modified)</x:ref> response. 775 </t> 776 <t> 777 The If-Range header field (<xref target="header.if-range"/>) can be used as 778 a precondition to applying the Range header field. 779 </t> 780 <t> 781 If all of the preconditions are true, the server supports the Range header 782 field for the target resource, the specified range(s) are syntactically 783 correct (as defined in <xref target="byte.ranges"/>), and at least one of 784 the ranges has a non-empty intersection with the current selected 785 representation extent, then the server &MAY; respond with a status code of 786 <x:ref>206 (Partial Content)</x:ref> and a payload containing one or more 787 partial representations that correspond to those requested, as defined in 788 <xref target="range.response"/>. 802 789 </t> 803 790 </section> … … 1252 1239 Date: Wed, 15 Nov 1995 06:25:24 GMT 1253 1240 Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT 1254 Content-type: multipart/byteranges; boundary=THIS_STRING_SEPARATES 1241 Content-Length: 1741 1242 Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES 1255 1243 1256 1244 --THIS_STRING_SEPARATES 1257 Content- type: application/pdf1258 Content- range: bytes 500-999/80001245 Content-Type: application/pdf 1246 Content-Range: bytes 500-999/8000 1259 1247 1260 1248 ...the first range... 1261 1249 --THIS_STRING_SEPARATES 1262 Content- type: application/pdf1263 Content- range: bytes 7000-7999/80001250 Content-Type: application/pdf 1251 Content-Range: bytes 7000-7999/8000 1264 1252 1265 1253 ...the second range … … 1273 1261 Date: Tue, 14 Nov 1995 06:25:24 GMT 1274 1262 Last-Modified: Tue, 14 July 04:58:08 GMT 1275 Content-type: multipart/byteranges; boundary=THIS_STRING_SEPARATES 1263 Content-Length: 2331785 1264 Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES 1276 1265 1277 1266 --THIS_STRING_SEPARATES 1278 Content- type: video/example1279 Content- range: exampleunit 1.2-4.3/251267 Content-Type: video/example 1268 Content-Range: exampleunit 1.2-4.3/25 1280 1269 1281 1270 ...the first range... 1282 1271 --THIS_STRING_SEPARATES 1283 Content- type: video/example1284 Content- range: exampleunit 11.2-14.3/251272 Content-Type: video/example 1273 Content-Range: exampleunit 11.2-14.3/25 1285 1274 1286 1275 ...the second range
Note: See TracChangeset
for help on using the changeset viewer.