source: draft-ietf-httpbis/00/p5-range.html @ 1633

Last change on this file since 1633 was 1099, checked in by julian.reschke@…, 9 years ago

bump up document dates, update to latest version of rfc2629.xslt

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/html;charset=utf-8
File size: 64.1 KB
1<!DOCTYPE html
2  PUBLIC "-//W3C//DTD HTML 4.01//EN">
3<html lang="en">
4   <head profile="">
5      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6      <title>HTTP/1.1, part 5: Range Requests and Partial Responses</title><style type="text/css" title="Xml2Rfc (sans serif)">
7a {
8  text-decoration: none;
10a.smpl {
11  color: black;
13a:hover {
14  text-decoration: underline;
16a:active {
17  text-decoration: underline;
19address {
20  margin-top: 1em;
21  margin-left: 2em;
22  font-style: normal;
24body {
25  color: black;
26  font-family: verdana, helvetica, arial, sans-serif;
27  font-size: 10pt;
29cite {
30  font-style: normal;
32dd {
33  margin-right: 2em;
35dl {
36  margin-left: 2em;
39ul.empty {
40  list-style-type: none;
42ul.empty li {
43  margin-top: .5em;
45dl p {
46  margin-left: 0em;
48dt {
49  margin-top: .5em;
51h1 {
52  font-size: 14pt;
53  line-height: 21pt;
54  page-break-after: avoid;
55} {
57  page-break-before: always;
59h1 a {
60  color: #333333;
62h2 {
63  font-size: 12pt;
64  line-height: 15pt;
65  page-break-after: avoid;
67h3, h4, h5, h6 {
68  font-size: 10pt;
69  page-break-after: avoid;
71h2 a, h3 a, h4 a, h5 a, h6 a {
72  color: black;
74img {
75  margin-left: 3em;
77li {
78  margin-left: 2em;
79  margin-right: 2em;
81ol {
82  margin-left: 2em;
83  margin-right: 2em;
85ol p {
86  margin-left: 0em;
88p {
89  margin-left: 2em;
90  margin-right: 2em;
92pre {
93  margin-left: 3em;
94  background-color: lightyellow;
95  padding: .25em;
97pre.text2 {
98  border-style: dotted;
99  border-width: 1px;
100  background-color: #f0f0f0;
101  width: 69em;
103pre.inline {
104  background-color: white;
105  padding: 0em;
107pre.text {
108  border-style: dotted;
109  border-width: 1px;
110  background-color: #f8f8f8;
111  width: 69em;
113pre.drawing {
114  border-style: solid;
115  border-width: 1px;
116  background-color: #f8f8f8;
117  padding: 2em;
119table {
120  margin-left: 2em;
122table.header {
123  border-spacing: 1px;
124  width: 95%;
125  font-size: 10pt;
126  color: white;
127} {
129  vertical-align: top;
131td.topnowrap {
132  vertical-align: top;
133  white-space: nowrap;
135table.header td {
136  background-color: gray;
137  width: 50%;
139table.header a {
140  color: white;
142td.reference {
143  vertical-align: top;
144  white-space: nowrap;
145  padding-right: 1em;
147thead {
148  display:table-header-group;
150ul.toc, ul.toc ul {
151  list-style: none;
152  margin-left: 1.5em;
153  margin-right: 0em;
154  padding-left: 0em;
156ul.toc li {
157  line-height: 150%;
158  font-weight: bold;
159  font-size: 10pt;
160  margin-left: 0em;
161  margin-right: 0em;
163ul.toc li li {
164  line-height: normal;
165  font-weight: normal;
166  font-size: 9pt;
167  margin-left: 0em;
168  margin-right: 0em;
170li.excluded {
171  font-size: 0pt;
173ul p {
174  margin-left: 0em;
176ul.ind, ul.ind ul {
177  list-style: none;
178  margin-left: 1.5em;
179  margin-right: 0em;
180  padding-left: 0em;
181  page-break-before: avoid;
183ul.ind li {
184  font-weight: bold;
185  line-height: 200%;
186  margin-left: 0em;
187  margin-right: 0em;
189ul.ind li li {
190  font-weight: normal;
191  line-height: 150%;
192  margin-left: 0em;
193  margin-right: 0em;
195.avoidbreak {
196  page-break-inside: avoid;
198.bcp14 {
199  font-style: normal;
200  text-transform: lowercase;
201  font-variant: small-caps;
203.comment {
204  background-color: yellow;
205} {
207  text-align: center;
209.error {
210  color: red;
211  font-style: italic;
212  font-weight: bold;
214.figure {
215  font-weight: bold;
216  text-align: center;
217  font-size: 9pt;
219.filename {
220  color: #333333;
221  font-weight: bold;
222  font-size: 12pt;
223  line-height: 21pt;
224  text-align: center;
226.fn {
227  font-weight: bold;
229.hidden {
230  display: none;
232.left {
233  text-align: left;
235.right {
236  text-align: right;
238.title {
239  color: #990000;
240  font-size: 18pt;
241  line-height: 18pt;
242  font-weight: bold;
243  text-align: center;
244  margin-top: 36pt;
246.vcardline {
247  display: block;
249.warning {
250  font-size: 14pt;
251  background-color: yellow;
255@media print {
256  .noprint {
257    display: none;
258  }
260  a {
261    color: black;
262    text-decoration: none;
263  }
265  table.header {
266    width: 90%;
267  }
269  td.header {
270    width: 50%;
271    color: black;
272    background-color: white;
273    vertical-align: top;
274    font-size: 12pt;
275  }
277  ul.toc a::after {
278    content: leader('.') target-counter(attr(href), page);
279  }
281  ul.ind li li a {
282    content: target-counter(attr(href), page);
283  }
285  .print2col {
286    column-count: 2;
287    -moz-column-count: 2;
288    column-fill: auto;
289  }
292@page {
293  @top-left {
294       content: "Internet-Draft";
295  }
296  @top-right {
297       content: "December 2007";
298  }
299  @top-center {
300       content: "HTTP/1.1";
301  }
302  @bottom-left {
303       content: "Fielding, et al.";
304  }
305  @bottom-center {
306       content: "Standards Track";
307  }
308  @bottom-right {
309       content: "[Page " counter(page) "]";
310  }
313@page:first {
314    @top-left {
315      content: normal;
316    }
317    @top-right {
318      content: normal;
319    }
320    @top-center {
321      content: normal;
322    }
324</style><link rel="Contents" href="#rfc.toc">
325      <link rel="Author" href="#rfc.authors">
326      <link rel="Copyright" href="#rfc.copyright">
327      <link rel="Index" href="#rfc.index">
328      <link rel="Chapter" title="1 Introduction" href="#rfc.section.1">
329      <link rel="Chapter" title="2 Range Units" href="#rfc.section.2">
330      <link rel="Chapter" title="3 Status Code Definitions" href="#rfc.section.3">
331      <link rel="Chapter" title="4 Combining Byte Ranges" href="#rfc.section.4">
332      <link rel="Chapter" title="5 Header Field Definitions" href="#rfc.section.5">
333      <link rel="Chapter" title="6 IANA Considerations" href="#rfc.section.6">
334      <link rel="Chapter" title="7 Security Considerations" href="#rfc.section.7">
335      <link rel="Chapter" title="8 Acknowledgments" href="#rfc.section.8">
336      <link rel="Chapter" href="#rfc.section.9" title="9 References">
337      <link rel="Appendix" title="A Internet Media Type multipart/byteranges" href="#rfc.section.A">
338      <link rel="Appendix" title="B Changes from RFC 2068" href="#rfc.section.B">
339      <meta name="generator" content=", Revision 1.537, 2010-12-30 14:21:59, XSLT vendor: SAXON 8.9 from Saxonica">
340      <link rel="schema.dct" href="">
341      <meta name="dct.creator" content="Fielding, R.">
342      <meta name="dct.creator" content="Gettys, J.">
343      <meta name="dct.creator" content="Mogul, J.">
344      <meta name="dct.creator" content="Frystyk, H.">
345      <meta name="dct.creator" content="Masinter, L.">
346      <meta name="dct.creator" content="Leach, P.">
347      <meta name="dct.creator" content="Berners-Lee, T.">
348      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p5-range-00">
349      <meta name="dct.issued" scheme="ISO8601" content="2007-12-20">
350      <meta name="dct.replaces" content="urn:ietf:rfc:2068">
351      <meta name="dct.replaces" content="urn:ietf:rfc:2616">
352      <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 &#34;HTTP/1.1&#34; and, taken together, obsoletes RFC 2616. Part 5 defines range-specific requests and the rules for constructing and combining responses to those requests.">
353      <meta name="description" 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 &#34;HTTP/1.1&#34; and, taken together, obsoletes RFC 2616. Part 5 defines range-specific requests and the rules for constructing and combining responses to those requests.">
354   </head>
355   <body>
356      <table class="header">
357         <tbody>
358            <tr>
359               <td class="left">Network Working Group</td>
360               <td class="right">R. Fielding, Editor</td>
361            </tr>
362            <tr>
363               <td class="left">Internet-Draft</td>
364               <td class="right">Day Software</td>
365            </tr>
366            <tr>
367               <td class="left">Obsoletes: <a href="">2068</a>, <a href="">2616</a> (if approved)
368               </td>
369               <td class="right">J. Gettys</td>
370            </tr>
371            <tr>
372               <td class="left">Intended status: Standards Track</td>
373               <td class="right">One Laptop per Child</td>
374            </tr>
375            <tr>
376               <td class="left">Expires: June 22, 2008</td>
377               <td class="right">J. Mogul</td>
378            </tr>
379            <tr>
380               <td class="left"></td>
381               <td class="right">HP</td>
382            </tr>
383            <tr>
384               <td class="left"></td>
385               <td class="right">H. Frystyk</td>
386            </tr>
387            <tr>
388               <td class="left"></td>
389               <td class="right">Microsoft</td>
390            </tr>
391            <tr>
392               <td class="left"></td>
393               <td class="right">L. Masinter</td>
394            </tr>
395            <tr>
396               <td class="left"></td>
397               <td class="right">Adobe Systems</td>
398            </tr>
399            <tr>
400               <td class="left"></td>
401               <td class="right">P. Leach</td>
402            </tr>
403            <tr>
404               <td class="left"></td>
405               <td class="right">Microsoft</td>
406            </tr>
407            <tr>
408               <td class="left"></td>
409               <td class="right">T. Berners-Lee</td>
410            </tr>
411            <tr>
412               <td class="left"></td>
413               <td class="right">W3C/MIT</td>
414            </tr>
415            <tr>
416               <td class="left"></td>
417               <td class="right">December 20, 2007</td>
418            </tr>
419         </tbody>
420      </table>
421      <p class="title">HTTP/1.1, part 5: Range Requests and Partial Responses<br><span class="filename">draft-ietf-httpbis-p5-range-00</span></p>
422      <h1><a id="rfc.status" href="#rfc.status">Status of this Memo</a></h1>
423      <p>By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she
424         is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section
425         6 of BCP 79.
426      </p>
427      <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note
428         that other groups may also distribute working documents as Internet-Drafts.
429      </p>
430      <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other
431         documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work
432         in progress”.
433      </p>
434      <p>The list of current Internet-Drafts can be accessed at <a href=""></a>.
435      </p>
436      <p>The list of Internet-Draft Shadow Directories can be accessed at <a href=""></a>.
437      </p>
438      <p>This Internet-Draft will expire on June 22, 2008.</p>
439      <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1>
440      <p>The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information
441         systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 5 of the
442         seven-part specification that defines the protocol referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616. Part
443         5 defines range-specific requests and the rules for constructing and combining responses to those requests.
444      </p>
445      <h1 id="rfc.note.1"><a href="#rfc.note.1">Editorial Note (To be removed by RFC Editor)</a></h1>
446      <p>This version of the HTTP specification contains only minimal editorial changes from <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> (abstract, introductory paragraph, and authors' addresses). All other changes are due to partitioning the original into seven
447         mostly independent parts. The intent is for readers of future drafts to able to use draft 00 as the basis for comparison when
448         the WG makes later changes to the specification text. This draft will shortly be followed by draft 01 (containing the first
449         round of changes that have already been agreed to on the mailing list). There is no point in reviewing this draft other than
450         to verify that the partitioning has been done correctly. Roy T. Fielding, Yves Lafon, and Julian Reschke will be the editors
451         after draft 00 is submitted.
452      </p> 
453      <p>Discussion of this draft should take place on the HTTPBIS working group mailing list ( The current issues
454         list is at &lt;<a href=""></a>&gt; and related documents (including fancy diffs) can be found at &lt;<a href=""></a>&gt;.
455      </p>
456      <hr class="noprint">
457      <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
458      <ul class="toc">
459         <li>1.&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a></li>
460         <li>2.&nbsp;&nbsp;&nbsp;<a href="#range.units">Range Units</a></li>
461         <li>3.&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3">Status Code Definitions</a><ul>
462               <li>3.1&nbsp;&nbsp;&nbsp;<a href="#status.206">206 Partial Content</a></li>
463               <li>3.2&nbsp;&nbsp;&nbsp;<a href="#status.416">416 Requested Range Not Satisfiable</a></li>
464            </ul>
465         </li>
466         <li>4.&nbsp;&nbsp;&nbsp;<a href="#combining.byte.ranges">Combining Byte Ranges</a></li>
467         <li>5.&nbsp;&nbsp;&nbsp;<a href="#header.fields">Header Field Definitions</a><ul>
468               <li>5.1&nbsp;&nbsp;&nbsp;<a href="#header.accept-ranges">Accept-Ranges</a></li>
469               <li>5.2&nbsp;&nbsp;&nbsp;<a href="#header.content-range">Content-Range</a></li>
470               <li>5.3&nbsp;&nbsp;&nbsp;<a href="#header.if-range">If-Range</a></li>
471               <li>5.4&nbsp;&nbsp;&nbsp;<a href="#header.range">Range</a><ul>
472                     <li>5.4.1&nbsp;&nbsp;&nbsp;<a href="#byte.ranges">Byte Ranges</a></li>
473                     <li>5.4.2&nbsp;&nbsp;&nbsp;<a href="#range.retrieval.requests">Range Retrieval Requests</a></li>
474                  </ul>
475               </li>
476            </ul>
477         </li>
478         <li>6.&nbsp;&nbsp;&nbsp;<a href="#IANA.considerations">IANA Considerations</a></li>
479         <li>7.&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a></li>
480         <li>8.&nbsp;&nbsp;&nbsp;<a href="#ack">Acknowledgments</a></li>
481         <li>9.&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a></li>
482         <li><a href="#rfc.authors">Authors' Addresses</a></li>
483         <li>A.&nbsp;&nbsp;&nbsp;<a href="">Internet Media Type multipart/byteranges</a></li>
484         <li>B.&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc.2068">Changes from RFC 2068</a></li>
485         <li><a href="#rfc.index">Index</a></li>
486         <li><a href="#rfc.ipr">Intellectual Property and Copyright Statements</a></li>
487      </ul>
488      <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a id="introduction" href="#introduction">Introduction</a></h1>
489      <p id="rfc.section.1.p.1">This document will define aspects of HTTP related to range requests, partial responses, and the multipart/byteranges media
490         type. Right now it only includes the extracted relevant sections of <a href="#RFC2616">RFC 2616</a> <cite title="Hypertext Transfer Protocol -- HTTP/1.1" id="rfc.xref.RFC2616.2">[RFC2616]</cite> without edit.
491      </p>
492      <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="range.units" href="#range.units">Range Units</a></h1>
493      <p id="rfc.section.2.p.1">HTTP/1.1 allows a client to request that only part (a range of) the response entity be included within the response. HTTP/1.1
494         uses range units in the Range (<a href="#header.range" id="rfc.xref.header.range.1" title="Range">Section&nbsp;5.4</a>) and Content-Range (<a href="#header.content-range" id="rfc.xref.header.content-range.1" title="Content-Range">Section&nbsp;5.2</a>) header fields. An entity can be broken down into subranges according to various structural units.
495      </p>
496      <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
497   bytes-unit       = "bytes"
498   other-range-unit = token
499</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.
500      </p>
501      <p id="rfc.section.2.p.4">HTTP/1.1 has been designed to allow implementations of applications that do not depend on knowledge of ranges.</p>
502      <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;Status Code Definitions
503      </h1>
504      <div id="rfc.iref.3"></div>
505      <div id="rfc.iref.s.1"></div>
506      <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a id="status.206" href="#status.206">206 Partial Content</a></h2>
507      <p id="rfc.section.3.1.p.1">The server has fulfilled the partial GET request for the resource. The request <em class="bcp14">MUST</em> have included a Range header field (<a href="#header.range" id="rfc.xref.header.range.2" title="Range">Section&nbsp;5.4</a>) indicating the desired range, and <em class="bcp14">MAY</em> have included an If-Range header field (<a href="#header.if-range" id="rfc.xref.header.if-range.1" title="If-Range">Section&nbsp;5.3</a>) to make the request conditional.
508      </p>
509      <p id="rfc.section.3.1.p.2">The response <em class="bcp14">MUST</em> include the following header fields:
510      </p>
511      <ul>
512         <li>Either a Content-Range header field (<a href="#header.content-range" id="rfc.xref.header.content-range.2" title="Content-Range">Section&nbsp;5.2</a>) indicating the range included with this response, or a multipart/byteranges Content-Type including Content-Range fields
513            for each part. If a Content-Length header field is present in the response, its value <em class="bcp14">MUST</em> match the actual number of OCTETs transmitted in the message-body.
514         </li>
515         <li>Date</li>
516         <li>ETag and/or Content-Location, if the header would have been sent in a 200 response to the same request</li>
517         <li>Expires, Cache-Control, and/or Vary, if the field-value might differ from that sent in any previous response for the same
518            variant
519         </li>
520      </ul>
521      <p id="rfc.section.3.1.p.3">If the 206 response is the result of an If-Range request that used a strong cache validator (see <a href="p4-conditional.html#weak.and.strong.validators" title="Weak and Strong Validators">Section 4</a> of <a href="#Part4" id="rfc.xref.Part4.1"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>), the response <em class="bcp14">SHOULD NOT</em> include other entity-headers. If the response is the result of an If-Range request that used a weak validator, the response <em class="bcp14">MUST NOT</em> include other entity-headers; this prevents inconsistencies between cached entity-bodies and updated headers. Otherwise, the
522         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.
523      </p>
524      <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 Byte Ranges">4</a>.
525      </p>
526      <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) responses.
527      </p>
528      <div id="rfc.iref.4"></div>
529      <div id="rfc.iref.s.2"></div>
530      <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;<a id="status.416" href="#status.416">416 Requested Range Not Satisfiable</a></h2>
531      <p id="rfc.section.3.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&nbsp;5.4</a>), and none of the range-specifier values in this field overlap the current extent of the selected resource, and the request
532         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
533         values were greater than the current length of the selected resource.)
534      </p>
535      <p id="rfc.section.3.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&nbsp;5.2</a>). This response <em class="bcp14">MUST NOT</em> use the multipart/byteranges content-type.
536      </p>
537      <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a id="combining.byte.ranges" href="#combining.byte.ranges">Combining Byte Ranges</a></h1>
538      <p id="rfc.section.4.p.1">A response might transfer only a subrange of the bytes of an entity-body, either because the request included one or more
539         Range specifications, or because a connection was broken prematurely. After several such transfers, a cache might have received
540         several ranges of the same entity-body.
541      </p>
542      <p id="rfc.section.4.p.2">If a cache has a stored non-empty set of subranges for an entity, and an incoming response transfers another subrange, the
543         cache <em class="bcp14">MAY</em> combine the new subrange with the existing set if both the following conditions are met:
544      </p>
545      <ul>
546         <li>Both the incoming response and the cache entry have a cache validator.</li>
547         <li>The two cache validators match using the strong comparison function (see <a href="p4-conditional.html#weak.and.strong.validators" title="Weak and Strong Validators">Section 4</a> of <a href="#Part4" id="rfc.xref.Part4.2"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>).
548         </li>
549      </ul>
550      <p id="rfc.section.4.p.3">If either requirement is not met, the cache <em class="bcp14">MUST</em> use only the most recent partial response (based on the Date values transmitted with every response, and using the incoming
551         response if these values are equal or missing), and <em class="bcp14">MUST</em> discard the other partial information.
552      </p>
553      <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;<a id="header.fields" href="#header.fields">Header Field Definitions</a></h1>
554      <p id="rfc.section.5.p.1">This section defines the syntax and semantics of all standard HTTP/1.1 header fields. For entity-header fields, both sender
555         and recipient refer to either the client or the server, depending on who sends and who receives the entity.
556      </p>
557      <div id="rfc.iref.a.1"></div>
558      <div id="rfc.iref.h.1"></div>
559      <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a>&nbsp;<a id="header.accept-ranges" href="#header.accept-ranges">Accept-Ranges</a></h2>
560      <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>
561      <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
562       acceptable-ranges = 1#range-unit | "none"
563</pre><p id="rfc.section.5.1.p.3">Origin servers that accept byte-range requests <em class="bcp14">MAY</em> send
564      </p>
565      <div id="rfc.figure.u.3"></div><pre class="text">       Accept-Ranges: bytes
566</pre><p id="rfc.section.5.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&nbsp;2</a>.
567      </p>
568      <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
569      </p>
570      <div id="rfc.figure.u.4"></div><pre class="text">       Accept-Ranges: none
571</pre><p id="rfc.section.5.1.p.8">to advise the client not to attempt a range request.</p>
572      <div id="rfc.iref.c.1"></div>
573      <div id="rfc.iref.h.2"></div>
574      <h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a>&nbsp;<a id="header.content-range" href="#header.content-range">Content-Range</a></h2>
575      <p id="rfc.section.5.2.p.1">The Content-Range entity-header is sent with a partial entity-body to specify where in the full entity-body the partial body
576         should be applied. Range units are defined in <a href="#range.units" title="Range Units">Section&nbsp;2</a>.
577      </p>
578      <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
580    content-range-spec      = byte-content-range-spec
581    byte-content-range-spec = bytes-unit SP
582                              byte-range-resp-spec "/"
583                              ( instance-length | "*" )
585    byte-range-resp-spec = (first-byte-pos "-" last-byte-pos)
586                                   | "*"
587    instance-length           = 1*DIGIT
588</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 "*"
589         character means that the instance-length is unknown at the time when the response was generated.
590      </p>
591      <p id="rfc.section.5.2.p.4">Unlike byte-ranges-specifier values (see <a href="#byte.ranges" title="Byte Ranges">Section&nbsp;5.4.1</a>), a byte-range-resp-spec <em class="bcp14">MUST</em> only specify one range, and <em class="bcp14">MUST</em> contain absolute byte positions for both the first and last byte of the range.
592      </p>
593      <p id="rfc.section.5.2.p.5">A byte-content-range-spec with a byte-range-resp-spec whose last-byte-pos value is less than its first-byte-pos value, or
594         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.
595      </p>
596      <p id="rfc.section.5.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 the
597         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 "*".
598      </p>
599      <p id="rfc.section.5.2.p.7">Examples of byte-content-range-spec values, assuming that the entity contains a total of 1234 bytes: </p>
600      <ul>
601         <li>The first 500 bytes:
602            <div id="rfc.figure.u.6"></div><pre class="text">   bytes 0-499/1234
603</pre> </li>
604         <li>The second 500 bytes:
605            <div id="rfc.figure.u.7"></div><pre class="text">   bytes 500-999/1234
606</pre> </li>
607         <li>All except for the first 500 bytes:
608            <div id="rfc.figure.u.8"></div><pre class="text">   bytes 500-1233/1234
609</pre> </li>
610         <li>The last 500 bytes:
611            <div id="rfc.figure.u.9"></div><pre class="text">   bytes 734-1233/1234
612</pre> </li>
613      </ul>
614      <p id="rfc.section.5.2.p.8">When an HTTP message includes the content of a single range (for example, a response to a request for a single range, or to
615         a request for a set of ranges that overlap without any holes), this content is transmitted with a Content-Range header, and
616         a Content-Length header showing the number of bytes actually transferred. For example,
617      </p>
618      <div id="rfc.figure.u.10"></div><pre class="text">    HTTP/1.1 206 Partial content
619    Date: Wed, 15 Nov 1995 06:25:24 GMT
620    Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
621    Content-Range: bytes 21010-47021/47022
622    Content-Length: 26012
623    Content-Type: image/gif
624</pre><p id="rfc.section.5.2.p.10">When an HTTP message includes the content of multiple ranges (for example, a response to a request for multiple non-overlapping
625         ranges), these are transmitted as a multipart message. The multipart media type used for this purpose is "multipart/byteranges"
626         as defined in <a href="" title="Internet Media Type multipart/byteranges">Appendix&nbsp;A</a>. See <a href="#changes.from.rfc.2068" title="Changes from RFC 2068">Appendix&nbsp;B</a> for a compatibility issue.
627      </p>
628      <p id="rfc.section.5.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.
629      </p>
630      <p id="rfc.section.5.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.
631      </p>
632      <p id="rfc.section.5.2.p.13">If the server ignores a byte-range-spec because it is syntactically invalid, the server <em class="bcp14">SHOULD</em> treat the request as if the invalid Range header field did not exist. (Normally, this means return a 200 response containing
633         the full entity).
634      </p>
635      <p id="rfc.section.5.2.p.14">If the server receives a request (other than one including an If-Range request-header field) with an unsatisfiable Range request-header
636         field (that is, all of whose byte-range-spec values have a first-byte-pos value greater than the current length of the selected
637         resource), it <em class="bcp14">SHOULD</em> return a response code of 416 (Requested range not satisfiable) (<a href="#status.416" id="rfc.xref.status.416.1" title="416 Requested Range Not Satisfiable">Section&nbsp;3.2</a>).
638      </p>
639      <ul class="empty">
640         <li> <b>Note:</b> clients cannot depend on servers to send a 416 (Requested range not satisfiable) response instead of a 200 (OK) response for
641            an unsatisfiable Range request-header, since not all servers implement this request-header.
642         </li>
643      </ul>
644      <div id="rfc.iref.i.1"></div>
645      <div id="rfc.iref.h.3"></div>
646      <h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a>&nbsp;<a id="header.if-range" href="#header.if-range">If-Range</a></h2>
647      <p id="rfc.section.5.3.p.1">If a client has a partial copy of an entity in its cache, and wishes to have an up-to-date copy of the entire entity in its
648         cache, it could use the Range request-header with a conditional GET (using either or both of If-Unmodified-Since and If-Match.)
649         However, if the condition fails because the entity has been modified, the client would then have to make a second request
650         to obtain the entire current entity-body.
651      </p>
652      <p id="rfc.section.5.3.p.2">The If-Range header allows a client to "short-circuit" the second request. Informally, its meaning is `if the entity is unchanged,
653         send me the part(s) that I am missing; otherwise, send me the entire new entity'.
654      </p>
655      <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 )
656</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
657         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.
658      </p>
659      <p id="rfc.section.5.3.p.5">If the entity tag given in the If-Range header matches the current entity tag for the entity, then the server <em class="bcp14">SHOULD</em> provide the specified sub-range of the entity using a 206 (Partial content) response. If the entity tag does not match, then
660         the server <em class="bcp14">SHOULD</em> return the entire entity using a 200 (OK) response.
661      </p>
662      <div id="rfc.iref.r.1"></div>
663      <div id="rfc.iref.h.4"></div>
664      <h2 id="rfc.section.5.4"><a href="#rfc.section.5.4">5.4</a>&nbsp;<a id="header.range" href="#header.range">Range</a></h2>
665      <h3 id="rfc.section.5.4.1"><a href="#rfc.section.5.4.1">5.4.1</a>&nbsp;<a id="byte.ranges" href="#byte.ranges">Byte Ranges</a></h3>
666      <p id="rfc.section.5.4.1.p.1">Since all HTTP entities are represented in HTTP messages as sequences of bytes, the concept of a byte range is meaningful
667         for any HTTP entity. (However, not all clients and servers need to support byte-range operations.)
668      </p>
669      <p id="rfc.section.5.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>
670      <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.
671      </p>
672      <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
673    byte-ranges-specifier = bytes-unit "=" byte-range-set
674    byte-range-set  = 1#( byte-range-spec | suffix-byte-range-spec )
675    byte-range-spec = first-byte-pos "-" [last-byte-pos]
676    first-byte-pos  = 1*DIGIT
677    last-byte-pos   = 1*DIGIT
678</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
679         gives the byte-offset of the last byte in the range; that is, the byte positions specified are inclusive. Byte offsets start
680         at zero.
681      </p>
682      <p id="rfc.section.5.4.1.p.6">If the last-byte-pos value is present, it <em class="bcp14">MUST</em> be greater than or equal to the first-byte-pos in that byte-range-spec, or the byte-range-spec is syntactically invalid. The
683         recipient of a byte-range-set that includes one or more syntactically invalid byte-range-spec values <em class="bcp14">MUST</em> ignore the header field that includes that byte-range-set.
684      </p>
685      <p id="rfc.section.5.4.1.p.7">If the last-byte-pos value is absent, or if the value is greater than or equal to the current length of the entity-body, last-byte-pos
686         is taken to be equal to one less than the current length of the entity-body in bytes.
687      </p>
688      <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>
689      <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
690    suffix-length = 1*DIGIT
691</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
692         is, this form specifies the last N bytes of an entity-body.) If the entity is shorter than the specified suffix-length, the
693         entire entity-body is used.
694      </p>
695      <p id="rfc.section.5.4.1.p.11">If a syntactically valid byte-range-set includes at least one byte-range-spec whose first-byte-pos is less than the current
696         length of the entity-body, or at least one suffix-byte-range-spec with a non-zero suffix-length, then the byte-range-set is
697         satisfiable. Otherwise, the byte-range-set is unsatisfiable. If the byte-range-set is unsatisfiable, the server <em class="bcp14">SHOULD</em> return a response with a status of 416 (Requested range not satisfiable). Otherwise, the server <em class="bcp14">SHOULD</em> return a response with a status of 206 (Partial Content) containing the satisfiable ranges of the entity-body.
698      </p>
699      <p id="rfc.section.5.4.1.p.12">Examples of byte-ranges-specifier values (assuming an entity-body of length 10000): </p>
700      <ul>
701         <li>The first 500 bytes (byte offsets 0-499, inclusive): bytes=0-499</li>
702         <li>The second 500 bytes (byte offsets 500-999, inclusive): bytes=500-999</li>
703         <li>The final 500 bytes (byte offsets 9500-9999, inclusive): bytes=-500</li>
704         <li>Or bytes=9500-</li>
705         <li>The first and last bytes only (bytes 0 and 9999): bytes=0-0,-1</li>
706         <li>Several legal but not canonical specifications of the second 500 bytes (byte offsets 500-999, inclusive): <br> bytes=500-600,601-999<br> bytes=500-700,601-999
707         </li>
708      </ul>
709      <h3 id="rfc.section.5.4.2"><a href="#rfc.section.5.4.2">5.4.2</a>&nbsp;<a id="range.retrieval.requests" href="#range.retrieval.requests">Range Retrieval Requests</a></h3>
710      <p id="rfc.section.5.4.2.p.1">HTTP retrieval requests using conditional or unconditional GET methods <em class="bcp14">MAY</em> request one or more sub-ranges of the entity, instead of the entire entity, using the Range request header, which applies
711         to the entity returned as the result of the request:
712      </p>
713      <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.20"></span>   Range = "Range" ":" ranges-specifier
714</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,
715         since Range supports efficient recovery from partially failed transfers, and supports efficient partial retrieval of large
716         entities.
717      </p>
718      <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 entity: </p>
719      <ul>
720         <li>The presence of a Range header in an unconditional GET modifies what is returned if the GET is otherwise successful. In other
721            words, the response carries a status code of 206 (Partial Content) instead of 200 (OK).
722         </li>
723         <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, or
724            one or both of If-Unmodified-Since and If-Match) modifies what is returned if the GET is otherwise successful and the condition
725            is true. It does not affect the 304 (Not Modified) response returned if the conditional is false.
726         </li>
727      </ul>
728      <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.2" title="If-Range">Section&nbsp;5.3</a>) in addition to the Range header.
729      </p>
730      <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
731         entity in reply, it <em class="bcp14">SHOULD</em> only return the requested range to its client. It <em class="bcp14">SHOULD</em> store the entire received response in its cache if that is consistent with its cache allocation policies.
732      </p>
733      <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a id="IANA.considerations" href="#IANA.considerations">IANA Considerations</a></h1>
734      <p id="rfc.section.6.p.1">TBD.</p>
735      <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;<a id="security.considerations" href="#security.considerations">Security Considerations</a></h1>
736      <p id="rfc.section.7.p.1">No additional security considerations have been identified beyond those applicable to HTTP in general <a href="#Part1" id="rfc.xref.Part1.1"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>.
737      </p>
738      <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a id="ack" href="#ack">Acknowledgments</a></h1>
739      <p id="rfc.section.8.p.1">Most of the specification of ranges is based on work originally done by Ari Luotonen and John Franks, with additional input
740         from Steve Zilles.
741      </p>
742      <p id="rfc.section.8.p.2">Based on an XML translation of RFC 2616 by Julian Reschke.</p>
743      <h1 id="rfc.references"><a href="#rfc.section.9" id="rfc.section.9">9.</a> References
744      </h1>
745      <table>       
746         <tr>
747            <td class="reference"><b id="Part1">[Part1]</b></td>
748            <td class="top"><a href="" title="Day Software">Fielding, R., Ed.</a>, <a href="" title="One Laptop per Child">Gettys, J.</a>, <a href="" title="Hewlett-Packard Company">Mogul, J.</a>, <a href="" title="Microsoft Corporation">Frystyk, H.</a>, <a href="" title="Adobe Systems, Incorporated">Masinter, L.</a>, <a href="" title="Microsoft Corporation">Leach, P.</a>, and <a href="" title="World Wide Web Consortium">T. Berners-Lee</a>, “<a href="">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p1-messaging-00 (work in progress), December&nbsp;2007.
749            </td>
750         </tr>
751         <tr>
752            <td class="reference"><b id="Part4">[Part4]</b></td>
753            <td class="top"><a href="" title="Day Software">Fielding, R., Ed.</a>, <a href="" title="One Laptop per Child">Gettys, J.</a>, <a href="" title="Hewlett-Packard Company">Mogul, J.</a>, <a href="" title="Microsoft Corporation">Frystyk, H.</a>, <a href="" title="Adobe Systems, Incorporated">Masinter, L.</a>, <a href="" title="Microsoft Corporation">Leach, P.</a>, and <a href="" title="World Wide Web Consortium">T. Berners-Lee</a>, “<a href="">HTTP/1.1, part 4: Conditional Requests</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p4-conditional-00 (work in progress), December&nbsp;2007.
754            </td>
755         </tr>
756         <tr>
757            <td class="reference"><b id="RFC2046">[RFC2046]</b></td>
758            <td class="top"><a href="" title="Innosoft International, Inc.">Freed, N.</a> and <a href="" title="First Virtual Holdings">N. Borenstein</a>, “<a href="">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</a>”, RFC&nbsp;2046, November&nbsp;1996.
759            </td>
760         </tr>
761         <tr>
762            <td class="reference"><b id="RFC2616">[RFC2616]</b></td>
763            <td class="top"><a href="" title="University of California, Irvine">Fielding, R.</a>, <a href="" title="W3C">Gettys, J.</a>, <a href="" title="Compaq Computer Corporation">Mogul, J.</a>, <a href="" title="MIT Laboratory for Computer Science">Frystyk, H.</a>, <a href="" title="Xerox Corporation">Masinter, L.</a>, <a href="" title="Microsoft Corporation">Leach, P.</a>, and <a href="" title="W3C">T. Berners-Lee</a>, “<a href="">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC&nbsp;2616, June&nbsp;1999.
764            </td>
765         </tr>
766      </table>
767      <div class="avoidbreak">
768         <h1 id="rfc.authors"><a href="#rfc.authors">Authors' Addresses</a></h1>
769         <address class="vcard"><span class="vcardline"><span class="fn">Roy T. Fielding</span>
770               (editor)
771               <span class="n hidden"><span class="family-name">Fielding</span><span class="given-name">Roy T.</span></span></span><span class="org vcardline">Day Software</span><span class="adr"><span class="street-address vcardline">23 Corporate Plaza DR, Suite 280</span><span class="vcardline"><span class="locality">Newport Beach</span>, <span class="region">CA</span>&nbsp;<span class="postal-code">92660</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline tel">Phone: <a href="tel:+1-949-706-5300"><span class="value">+1-949-706-5300</span></a></span><span class="vcardline tel"><span class="type">Fax</span>: <a href="fax:+1-949-706-5305"><span class="value">+1-949-706-5305</span></a></span><span class="vcardline">EMail: <a href=""><span class="email"></span></a></span><span class="vcardline">URI: <a href="" class="url"></a></span></address>
772         <address class="vcard"><span class="vcardline"><span class="fn">Jim Gettys</span><span class="n hidden"><span class="family-name">Gettys</span><span class="given-name">Jim</span></span></span><span class="org vcardline">One Laptop per Child</span><span class="adr"><span class="street-address vcardline">21 Oak Knoll Road</span><span class="vcardline"><span class="locality">Carlisle</span>, <span class="region">MA</span>&nbsp;<span class="postal-code">01741</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">EMail: <a href=""><span class="email"></span></a></span><span class="vcardline">URI: <a href="" class="url"></a></span></address>
773         <address class="vcard"><span class="vcardline"><span class="fn">Jeffrey C. Mogul</span><span class="n hidden"><span class="family-name">Mogul</span><span class="given-name">Jeffrey C.</span></span></span><span class="org vcardline">Hewlett-Packard Company</span><span class="adr"><span class="street-address vcardline">HP Labs, Large Scale Systems Group</span><span class="street-address vcardline">1501 Page Mill Road, MS 1177</span><span class="vcardline"><span class="locality">Palo Alto</span>, <span class="region">CA</span>&nbsp;<span class="postal-code">94304</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">EMail: <a href=""><span class="email"></span></a></span></address>
774         <address class="vcard"><span class="vcardline"><span class="fn">Henrik Frystyk Nielsen</span><span class="n hidden"><span class="family-name">Frystyk</span></span></span><span class="org vcardline">Microsoft Corporation</span><span class="adr"><span class="street-address vcardline">1 Microsoft Way</span><span class="vcardline"><span class="locality">Redmond</span>, <span class="region">WA</span>&nbsp;<span class="postal-code">98052</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">EMail: <a href=""><span class="email"></span></a></span></address>
775         <address class="vcard"><span class="vcardline"><span class="fn">Larry Masinter</span><span class="n hidden"><span class="family-name">Masinter</span><span class="given-name">Larry</span></span></span><span class="org vcardline">Adobe Systems, Incorporated</span><span class="adr"><span class="street-address vcardline">345 Park Ave</span><span class="vcardline"><span class="locality">San Jose</span>, <span class="region">CA</span>&nbsp;<span class="postal-code">95110</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">EMail: <a href=""><span class="email"></span></a></span><span class="vcardline">URI: <a href="" class="url"></a></span></address>
776         <address class="vcard"><span class="vcardline"><span class="fn">Paul J. Leach</span><span class="n hidden"><span class="family-name">Leach</span><span class="given-name">Paul J.</span></span></span><span class="org vcardline">Microsoft Corporation</span><span class="adr"><span class="street-address vcardline">1 Microsoft Way</span><span class="vcardline"><span class="locality">Redmond</span>, <span class="region">WA</span>&nbsp;<span class="postal-code">98052</span></span></span><span class="vcardline">EMail: <a href=""><span class="email"></span></a></span></address>
777         <address class="vcard"><span class="vcardline"><span class="fn">Tim Berners-Lee</span><span class="n hidden"><span class="family-name">Berners-Lee</span><span class="given-name">Tim</span></span></span><span class="org vcardline">World Wide Web Consortium</span><span class="adr"><span class="street-address vcardline">MIT Computer Science and Artificial Intelligence Laboratory</span><span class="street-address vcardline">The Stata Center, Building 32</span><span class="street-address vcardline">32 Vassar Street</span><span class="vcardline"><span class="locality">Cambridge</span>, <span class="region">MA</span>&nbsp;<span class="postal-code">02139</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">EMail: <a href=""><span class="email"></span></a></span><span class="vcardline">URI: <a href="" class="url"></a></span></address>
778      </div>
779      <div id="rfc.iref.m.1"></div>
780      <div id="rfc.iref.m.2"></div>
781      <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a id="" href="">Internet Media Type multipart/byteranges</a></h1>
782      <p id="rfc.section.A.p.1">When an HTTP 206 (Partial Content) response message includes the content of multiple ranges (a response to a request for multiple
783         non-overlapping ranges), these are transmitted as a multipart message-body. The media type for this purpose is called "multipart/byteranges".
784      </p>
785      <p id="rfc.section.A.p.2">The multipart/byteranges media type includes two or more parts, each with its own Content-Type and Content-Range fields. The
786         required boundary parameter specifies the boundary string used to separate each body-part.
787      </p>
788      <p id="rfc.section.A.p.3"> </p>
789      <dl>
790         <dt>Media Type name:</dt>
791         <dd>multipart</dd>
792         <dt>Media subtype name:</dt>
793         <dd>byteranges</dd>
794         <dt>Required parameters:</dt>
795         <dd>boundary</dd>
796         <dt>Optional parameters:</dt>
797         <dd>none</dd>
798         <dt>Encoding considerations:</dt>
799         <dd>only "7bit", "8bit", or "binary" are permitted</dd>
800         <dt>Security considerations:</dt>
801         <dd>none</dd>
802      </dl>
803      <div id="rfc.figure.u.15"></div>
804      <p>For example:</p><pre class="text">   HTTP/1.1 206 Partial Content
805   Date: Wed, 15 Nov 1995 06:25:24 GMT
806   Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
807   Content-type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
810   Content-type: application/pdf
811   Content-range: bytes 500-999/8000
813   ...the first range...
815   Content-type: application/pdf
816   Content-range: bytes 7000-7999/8000
818   ...the second range
820</pre><p id="rfc.section.A.p.5">Notes: </p>
821      <ol>
822         <li>Additional CRLFs may precede the first boundary string in the entity.</li>
823         <li>Although RFC 2046 <a href="#RFC2046" id="rfc.xref.RFC2046.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a> permits the boundary string to be quoted, some existing implementations handle a quoted boundary string incorrectly.
824         </li>
825         <li>A number of browsers and servers were coded to an early draft of the byteranges specification to use a media type of multipart/x-byteranges<span id="rfc.iref.m.3"></span><span id="rfc.iref.m.4"></span>, which is almost, but not quite compatible with the version documented in HTTP/1.1.
826         </li>
827      </ol>
828      <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a id="changes.from.rfc.2068" href="#changes.from.rfc.2068">Changes from RFC 2068</a></h1>
829      <p id="rfc.section.B.p.1">There are situations where a server (especially a proxy) does not know the full length of a response but is capable of serving
830         a byterange request. We therefore need a mechanism to allow byteranges with a content-range not indicating the full length
831         of the message. (<a href="#header.content-range" id="rfc.xref.header.content-range.4" title="Content-Range">Section&nbsp;5.2</a>)
832      </p>
833      <p id="rfc.section.B.p.2">Range request responses would become very verbose if all meta-data were always returned; by allowing the server to only send
834         needed headers in a 206 response, this problem can be avoided.
835      </p>
836      <p id="rfc.section.B.p.3">Fix problem with unsatisfiable range requests; there are two cases: syntactic problems, and range doesn't exist in the document.
837         The 416 status code was needed to resolve this ambiguity needed to indicate an error for a byte range request that falls outside
838         of the actual contents of a document. (Section <a href="#status.416" id="rfc.xref.status.416.2" title="416 Requested Range Not Satisfiable">3.2</a>, <a href="#header.content-range" id="rfc.xref.header.content-range.5" title="Content-Range">5.2</a>)
839      </p>
840      <h1 id="rfc.index"><a href="#rfc.index">Index</a></h1>
841      <p class="noprint"><a href="#rfc.index.2">2</a> <a href="#rfc.index.4">4</a> <a href="#rfc.index.A">A</a> <a href="#rfc.index.C">C</a> <a href="#rfc.index.G">G</a> <a href="#rfc.index.H">H</a> <a href="#rfc.index.I">I</a> <a href="#rfc.index.M">M</a> <a href="#rfc.index.P">P</a> <a href="#rfc.index.R">R</a> <a href="#rfc.index.S">S</a>
842      </p>
843      <div class="print2col">
844         <ul class="ind">
845            <li><a id="rfc.index.2" href="#rfc.index.2"><b>2</b></a><ul>
846                  <li>206 Partial Content (status code)&nbsp;&nbsp;<a href="#rfc.iref.3"><b>3.1</b></a></li>
847               </ul>
848            </li>
849            <li><a id="rfc.index.4" href="#rfc.index.4"><b>4</b></a><ul>
850                  <li>416 Requested Range Not Satisfiable (status code)&nbsp;&nbsp;<a href="#rfc.iref.4"><b>3.2</b></a>, <a href="#rfc.xref.status.416.1">5.2</a>, <a href="#rfc.xref.status.416.2">B</a></li>
851               </ul>
852            </li>
853            <li><a id="rfc.index.A" href="#rfc.index.A"><b>A</b></a><ul>
854                  <li>Accept-Ranges header&nbsp;&nbsp;<a href="#rfc.iref.a.1"><b>5.1</b></a></li>
855               </ul>
856            </li>
857            <li><a id="rfc.index.C" href="#rfc.index.C"><b>C</b></a><ul>
858                  <li>Content-Range header&nbsp;&nbsp;<a href="#rfc.xref.header.content-range.1">2</a>, <a href="#rfc.xref.header.content-range.2">3.1</a>, <a href="#rfc.xref.header.content-range.3">3.2</a>, <a href="#rfc.iref.c.1"><b>5.2</b></a>, <a href="#rfc.xref.header.content-range.4">B</a>, <a href="#rfc.xref.header.content-range.5">B</a></li>
859               </ul>
860            </li>
861            <li><a id="rfc.index.G" href="#rfc.index.G"><b>G</b></a><ul>
862                  <li><tt>Grammar</tt>&nbsp;&nbsp;
863                     <ul>
864                        <li><tt>Accept-Ranges</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.4"><b>5.1</b></a></li>
865                        <li><tt>acceptable-ranges</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.5"><b>5.1</b></a></li>
866                        <li><tt>byte-content-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.8"><b>5.2</b></a></li>
867                        <li><tt>byte-range-resp-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.9"><b>5.2</b></a></li>
868                        <li><tt>byte-range-set</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.14"><b>5.4.1</b></a></li>
869                        <li><tt>byte-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.15"><b>5.4.1</b></a></li>
870                        <li><tt>byte-ranges-specifier</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.13"><b>5.4.1</b></a></li>
871                        <li><tt>bytes-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.2"><b>2</b></a></li>
872                        <li><tt>Content-Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.6"><b>5.2</b></a></li>
873                        <li><tt>content-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.7"><b>5.2</b></a></li>
874                        <li><tt>first-byte-pos</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.16"><b>5.4.1</b></a></li>
875                        <li><tt>If-Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.11"><b>5.3</b></a></li>
876                        <li><tt>instance-length</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.10"><b>5.2</b></a></li>
877                        <li><tt>last-byte-pos</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.17"><b>5.4.1</b></a></li>
878                        <li><tt>other-range-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.3"><b>2</b></a></li>
879                        <li><tt>Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.20"><b>5.4.2</b></a></li>
880                        <li><tt>range-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.1"><b>2</b></a></li>
881                        <li><tt>ranges-specifier</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.12"><b>5.4.1</b></a></li>
882                        <li><tt>suffix-byte-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.18"><b>5.4.1</b></a></li>
883                        <li><tt>suffix-length</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.19"><b>5.4.1</b></a></li>
884                     </ul>
885                  </li>
886               </ul>
887            </li>
888            <li><a id="rfc.index.H" href="#rfc.index.H"><b>H</b></a><ul>
889                  <li>Headers&nbsp;&nbsp;
890                     <ul>
891                        <li>Accept-Ranges&nbsp;&nbsp;<a href="#rfc.iref.h.1"><b>5.1</b></a></li>
892                        <li>Content-Range&nbsp;&nbsp;<a href="#rfc.xref.header.content-range.1">2</a>, <a href="#rfc.xref.header.content-range.2">3.1</a>, <a href="#rfc.xref.header.content-range.3">3.2</a>, <a href="#rfc.iref.h.2"><b>5.2</b></a>, <a href="#rfc.xref.header.content-range.4">B</a>, <a href="#rfc.xref.header.content-range.5">B</a></li>
893                        <li>If-Range&nbsp;&nbsp;<a href="#rfc.xref.header.if-range.1">3.1</a>, <a href="#rfc.iref.h.3"><b>5.3</b></a>, <a href="#rfc.xref.header.if-range.2">5.4.2</a></li>
894                        <li>Range&nbsp;&nbsp;<a href="#rfc.xref.header.range.1">2</a>, <a href="#rfc.xref.header.range.2">3.1</a>, <a href="#rfc.xref.header.range.3">3.2</a>, <a href="#rfc.iref.h.4"><b>5.4</b></a></li>
895                     </ul>
896                  </li>
897               </ul>
898            </li>
899            <li><a id="rfc.index.I" href="#rfc.index.I"><b>I</b></a><ul>
900                  <li>If-Range header&nbsp;&nbsp;<a href="#rfc.xref.header.if-range.1">3.1</a>, <a href="#rfc.iref.i.1"><b>5.3</b></a>, <a href="#rfc.xref.header.if-range.2">5.4.2</a></li>
901               </ul>
902            </li>
903            <li><a id="rfc.index.M" href="#rfc.index.M"><b>M</b></a><ul>
904                  <li>Media Type&nbsp;&nbsp;
905                     <ul>
906                        <li>multipart/byteranges&nbsp;&nbsp;<a href="#rfc.iref.m.1"><b>A</b></a></li>
907                        <li>multipart/x-byteranges&nbsp;&nbsp;<a href="#rfc.iref.m.4">A</a></li>
908                     </ul>
909                  </li>
910                  <li>multipart/byteranges Media Type&nbsp;&nbsp;<a href="#rfc.iref.m.2"><b>A</b></a></li>
911                  <li>multipart/x-byteranges Media Type&nbsp;&nbsp;<a href="#rfc.iref.m.3">A</a></li>
912               </ul>
913            </li>
914            <li><a id="rfc.index.P" href="#rfc.index.P"><b>P</b></a><ul>
915                  <li><em>Part1</em>&nbsp;&nbsp;<a href="#rfc.xref.Part1.1">7</a>, <a href="#Part1"><b>9</b></a></li>
916                  <li><em>Part4</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.1">3.1</a>, <a href="#rfc.xref.Part4.2">4</a>, <a href="#Part4"><b>9</b></a><ul>
917                        <li><em>Section 4</em>&nbsp;&nbsp;<a href="#rfc.xref.Part4.1">3.1</a>, <a href="#rfc.xref.Part4.2">4</a></li>
918                     </ul>
919                  </li>
920               </ul>
921            </li>
922            <li><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul>
923                  <li>Range header&nbsp;&nbsp;<a href="#rfc.xref.header.range.1">2</a>, <a href="#rfc.xref.header.range.2">3.1</a>, <a href="#rfc.xref.header.range.3">3.2</a>, <a href="#rfc.iref.r.1"><b>5.4</b></a></li>
924                  <li><em>RFC2046</em>&nbsp;&nbsp;<a href="#RFC2046"><b>9</b></a>, <a href="#rfc.xref.RFC2046.1">A</a></li>
925                  <li><em>RFC2616</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.1">§</a>, <a href="#rfc.xref.RFC2616.2">1</a>, <a href="#RFC2616"><b>9</b></a></li>
926               </ul>
927            </li>
928            <li><a id="rfc.index.S" href="#rfc.index.S"><b>S</b></a><ul>
929                  <li>Status Codes&nbsp;&nbsp;
930                     <ul>
931                        <li>206 Partial Content&nbsp;&nbsp;<a href="#rfc.iref.s.1"><b>3.1</b></a></li>
932                        <li>416 Requested Range Not Satisfiable&nbsp;&nbsp;<a href="#rfc.iref.s.2"><b>3.2</b></a>, <a href="#rfc.xref.status.416.1">5.2</a>, <a href="#rfc.xref.status.416.2">B</a></li>
933                     </ul>
934                  </li>
935               </ul>
936            </li>
937         </ul>
938      </div>
939      <h1><a id="rfc.copyright" href="#rfc.copyright">Full Copyright Statement</a></h1>
940      <p>Copyright © The IETF Trust (2007).</p>
941      <p>This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the
942         authors retain all their rights.
943      </p>
944      <p>This document and the information contained herein are provided on an “AS IS” basis and THE CONTRIBUTOR, THE ORGANIZATION
948      </p>
949      <h1><a id="rfc.ipr" href="#rfc.ipr">Intellectual Property</a></h1>
950      <p>The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might
951         be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any
952         license under such rights might or might not be available; nor does it represent that it has made any independent effort to
953         identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and
954         BCP 79.
955      </p>
956      <p>Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result
957         of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users
958         of this specification can be obtained from the IETF on-line IPR repository at <a href=""></a>.
959      </p>
960      <p>The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary
961         rights that may cover technology that may be required to implement this standard. Please address the information to the IETF
962         at <a href=""></a>.
963      </p>
964   </body>
Note: See TracBrowser for help on using the repository browser.