source: draft-ietf-httpbis/latest/p5-range.xml @ 205

Last change on this file since 205 was 205, checked in by julian.reschke@…, 12 years ago

Add sections that for now normatively reference the ABNF syntax and basic rules from Part1, also start work on referencing ABNF rules adopted from other parts (ongoing); relates to #36.

  • Property svn:eol-style set to native
File size: 51.4 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
3<!DOCTYPE rfc [
4  <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>">
14  <!ENTITY ID-VERSION "latest">
15  <!ENTITY ID-MONTH "February">
16  <!ENTITY ID-YEAR "2008">
17  <!ENTITY notation-abnf              "<xref target='Part1' x:rel='#notation.abnf' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
18  <!ENTITY basic-rules                "<xref target='Part1' x:rel='#basic.rules' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
19  <!ENTITY full-date                  "<xref target='Part1' x:rel='#full.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
20  <!ENTITY messaging                  "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
21  <!ENTITY entity-tags                "<xref target='Part4' x:rel='#entity.tags' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
22  <!ENTITY weak-and-strong-validators "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
23]>
24<?rfc toc="yes" ?>
25<?rfc symrefs="yes" ?>
26<?rfc sortrefs="yes" ?>
27<?rfc compact="yes"?>
28<?rfc subcompact="no" ?>
29<?rfc linkmailto="no" ?>
30<?rfc editing="no" ?>
31<?rfc comments="yes"?>
32<?rfc inline="yes"?>
33<?rfc-ext allow-markup-in-artwork="yes" ?>
34<?rfc-ext include-references-in-index="yes" ?>
35<rfc obsoletes="2616" category="std"
36     ipr="full3978" docName="draft-ietf-httpbis-p5-range-&ID-VERSION;"
37     xmlns:x='http://purl.org/net/xml2rfc/ext'>
38<front>
39
40  <title abbrev="HTTP/1.1, Part 5">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
41
42  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
43    <organization abbrev="Day Software">Day Software</organization>
44    <address>
45      <postal>
46        <street>23 Corporate Plaza DR, Suite 280</street>
47        <city>Newport Beach</city>
48        <region>CA</region>
49        <code>92660</code>
50        <country>USA</country>
51      </postal>
52      <phone>+1-949-706-5300</phone>
53      <facsimile>+1-949-706-5305</facsimile>
54      <email>fielding@gbiv.com</email>
55      <uri>http://roy.gbiv.com/</uri>
56    </address>
57  </author>
58
59  <author initials="J." surname="Gettys" fullname="Jim Gettys">
60    <organization>One Laptop per Child</organization>
61    <address>
62      <postal>
63        <street>21 Oak Knoll Road</street>
64        <city>Carlisle</city>
65        <region>MA</region>
66        <code>01741</code>
67        <country>USA</country>
68      </postal>
69      <email>jg@laptop.org</email>
70      <uri>http://www.laptop.org/</uri>
71    </address>
72  </author>
73 
74  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
75    <organization abbrev="HP">Hewlett-Packard Company</organization>
76    <address>
77      <postal>
78        <street>HP Labs, Large Scale Systems Group</street>
79        <street>1501 Page Mill Road, MS 1177</street>
80        <city>Palo Alto</city>
81        <region>CA</region>
82        <code>94304</code>
83        <country>USA</country>
84      </postal>
85      <email>JeffMogul@acm.org</email>
86    </address>
87  </author>
88
89  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
90    <organization abbrev="Microsoft">Microsoft Corporation</organization>
91    <address>
92      <postal>
93        <street>1 Microsoft Way</street>
94        <city>Redmond</city>
95        <region>WA</region>
96        <code>98052</code>
97        <country>USA</country>
98      </postal>
99      <email>henrikn@microsoft.com</email>
100    </address>
101  </author>
102
103  <author initials="L." surname="Masinter" fullname="Larry Masinter">
104    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
105    <address>
106      <postal>
107        <street>345 Park Ave</street>
108        <city>San Jose</city>
109        <region>CA</region>
110        <code>95110</code>
111        <country>USA</country>
112      </postal>
113      <email>LMM@acm.org</email>
114      <uri>http://larry.masinter.net/</uri>
115    </address>
116  </author>
117 
118  <author initials="P." surname="Leach" fullname="Paul J. Leach">
119    <organization abbrev="Microsoft">Microsoft Corporation</organization>
120    <address>
121      <postal>
122        <street>1 Microsoft Way</street>
123        <city>Redmond</city>
124        <region>WA</region>
125        <code>98052</code>
126      </postal>
127      <email>paulle@microsoft.com</email>
128    </address>
129  </author>
130   
131  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
132    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
133    <address>
134      <postal>
135        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
136        <street>The Stata Center, Building 32</street>
137        <street>32 Vassar Street</street>
138        <city>Cambridge</city>
139        <region>MA</region>
140        <code>02139</code>
141        <country>USA</country>
142      </postal>
143      <email>timbl@w3.org</email>
144      <uri>http://www.w3.org/People/Berners-Lee/</uri>
145    </address>
146  </author>
147
148  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
149    <organization abbrev="W3C">World Wide Web Consortium</organization>
150    <address>
151      <postal>
152        <street>W3C / ERCIM</street>
153        <street>2004, rte des Lucioles</street>
154        <city>Sophia-Antipolis</city>
155        <region>AM</region>
156        <code>06902</code>
157        <country>France</country>
158      </postal>
159      <email>ylafon@w3.org</email>
160      <uri>http://www.raubacapeu.net/people/yves/</uri>
161    </address>
162  </author>
163
164  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
165    <organization abbrev="greenbytes">greenbytes GmbH</organization>
166    <address>
167      <postal>
168        <street>Hafenweg 16</street>
169        <city>Muenster</city><region>NW</region><code>48155</code>
170        <country>Germany</country>
171      </postal>
172      <phone>+49 251 2807760</phone>   
173      <facsimile>+49 251 2807761</facsimile>   
174      <email>julian.reschke@greenbytes.de</email>       
175      <uri>http://greenbytes.de/tech/webdav/</uri>     
176    </address>
177  </author>
178
179  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
180
181<abstract>
182<t>
183   The Hypertext Transfer Protocol (HTTP) is an application-level
184   protocol for distributed, collaborative, hypermedia information
185   systems. HTTP has been in use by the World Wide Web global information
186   initiative since 1990. This document is Part 5 of the seven-part specification
187   that defines the protocol referred to as "HTTP/1.1" and, taken together,
188   obsoletes RFC 2616.  Part 5 defines range-specific requests and
189   the rules for constructing and combining responses to those requests.
190</t>
191</abstract>
192
193<note title="Editorial Note (To be removed by RFC Editor)">
194  <t>
195    Discussion of this draft should take place on the HTTPBIS working group
196    mailing list (ietf-http-wg@w3.org). The current issues list is
197    at <eref target="http://www.tools.ietf.org/wg/httpbis/trac/report/11"/>
198    and related documents (including fancy diffs) can be found at
199    <eref target="http://www.tools.ietf.org/wg/httpbis/"/>.
200  </t>
201  <t>
202    This draft incorporates those issue resolutions that were either
203    collected in the original RFC2616 errata list (<eref target="http://purl.org/NET/http-errata"/>),
204    or which were agreed upon on the mailing list between October 2006 and
205    November 2007 (as published in "draft-lafon-rfc2616bis-03").
206  </t>
207</note>
208</front>
209<middle>
210<section title="Introduction" anchor="introduction">
211<t>
212   HTTP clients often encounter interrupted data transfers as a result
213   of cancelled requests or dropped connections.  When a cache has stored
214   a partial representation, it is desirable to request the remainder
215   of that representation in a subsequent request rather than transfer
216   the entire representation.
217   There are also a number of Web applications that benefit from being
218   able to request only a subset of a larger representation, such as a
219   single page of a very large document or only part of an image to be
220   rendered by a device with limited local storage.
221</t>
222<t>
223   This document defines HTTP/1.1 range requests,
224   partial responses, and the multipart/byteranges media type.
225   The protocol for range requests is an &OPTIONAL; feature of HTTP,
226   designed so resources or recipients that do not implement this feature
227   can respond as if it is a normal GET request without impacting
228   interoperability.  Partial responses are indicated by a distinct status
229   code to not be mistaken for full responses by intermediate caches
230   that might not implement the feature.
231</t>
232<t>
233   Although the HTTP range request mechanism is designed to allow for
234   extensible range types, this specification only defines requests for
235   byte ranges.
236</t>
237
238<section title="Requirements" anchor="intro.requirements">
239<t>
240   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
241   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
242   document are to be interpreted as described in <xref target="RFC2119"/>.
243</t>
244<t>
245   An implementation is not compliant if it fails to satisfy one or more
246   of the &MUST; or &REQUIRED; level requirements for the protocols it
247   implements. An implementation that satisfies all the &MUST; or &REQUIRED;
248   level and all the &SHOULD; level requirements for its protocols is said
249   to be "unconditionally compliant"; one that satisfies all the &MUST;
250   level requirements but not all the &SHOULD; level requirements for its
251   protocols is said to be "conditionally compliant."
252</t>
253</section>
254</section>
255
256<section title="Notational Conventions and Generic Grammar" anchor="notation">
257<t>
258  This specification uses the ABNF syntax defined in &notation-abnf; and
259  the core rules defined in &basic-rules;:
260  <cref anchor="abnf.dep">ABNF syntax and basic rules will be adopted from RFC 5234, see
261  <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>.</cref>
262</t>
263<figure><artwork type="abnf2616">
264  DIGIT      = &lt;DIGIT, defined in &basic-rules;&gt;
265  SP         = &lt;SP, defined in &basic-rules;&gt;
266</artwork></figure>
267<figure><artwork type="abnf2616">
268  token      = &lt;token, defined in &basic-rules;&gt;
269</artwork></figure>
270<t>
271  The ABNF rules below are defined in other parts:
272</t>
273<figure><artwork type="abnf2616">
274  HTTP-date  = &lt;HTTP-date, defined in &full-date;&gt;
275</artwork></figure>
276<figure><artwork type="abnf2616">
277  entity-tag = &lt;entity-tag, defined in &entity-tags;&gt;
278</artwork></figure>
279</section>
280
281<section title="Range Units" anchor="range.units">
282<t>
283   HTTP/1.1 allows a client to request that only part (a range of) the
284   response entity be included within the response. HTTP/1.1 uses range
285   units in the Range (<xref target="header.range"/>) and Content-Range (<xref target="header.content-range"/>)
286   header fields. An entity can be broken down into subranges according
287   to various structural units.
288</t>
289<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="range-unit"/><iref primary="true" item="Grammar" subitem="bytes-unit"/><iref primary="true" item="Grammar" subitem="other-range-unit"/>
290  range-unit       = bytes-unit | other-range-unit
291  bytes-unit       = "bytes"
292  other-range-unit = token
293</artwork></figure>
294<t>
295   The only range unit defined by HTTP/1.1 is "bytes". HTTP/1.1
296   implementations &MAY; ignore ranges specified using other units.
297</t>
298<t>
299   HTTP/1.1 has been designed to allow implementations of applications
300   that do not depend on knowledge of ranges.
301</t>
302</section>
303
304<section title="Status Code Definitions">
305<section title="206 Partial Content" anchor="status.206">
306  <iref primary="true" item="206 Partial Content (status code)" x:for-anchor=""/>
307  <iref primary="true" item="Status Codes" subitem="206 Partial Content" x:for-anchor=""/>
308<t>
309   The server has fulfilled the partial GET request for the resource.
310   The request &MUST; have included a Range header field (<xref target="header.range"/>)
311   indicating the desired range, and &MAY; have included an If-Range
312   header field (<xref target="header.if-range"/>) to make the request conditional.
313</t>
314<t>
315   The response &MUST; include the following header fields:
316  <list style="symbols">
317    <t>
318        Either a Content-Range header field (<xref target="header.content-range"/>) indicating
319        the range included with this response, or a multipart/byteranges
320        Content-Type including Content-Range fields for each part. If a
321        Content-Length header field is present in the response, its
322        value &MUST; match the actual number of OCTETs transmitted in the
323        message-body.
324    </t>
325    <t>
326        Date
327    </t>
328    <t>
329        ETag and/or Content-Location, if the header would have been sent
330        in a 200 response to the same request
331    </t>
332    <t>
333        Expires, Cache-Control, and/or Vary, if the field-value might
334        differ from that sent in any previous response for the same
335        variant
336    </t>
337  </list>
338</t>
339<t>
340   If the 206 response is the result of an If-Range request, the response
341   &SHOULD-NOT; include other entity-headers. Otherwise, the response
342   &MUST; include all of the entity-headers that would have been returned
343   with a 200 (OK) response to the same request.
344</t>
345<t>
346   A cache &MUST-NOT; combine a 206 response with other previously cached
347   content if the ETag or Last-Modified headers do not match exactly,
348   see <xref target="combining.byte.ranges"/>.
349</t>
350<t>
351   A cache that does not support the Range and Content-Range headers
352   &MUST-NOT; cache 206 (Partial Content) responses.
353</t>
354</section>
355
356<section title="416 Requested Range Not Satisfiable" anchor="status.416">
357  <iref primary="true" item="416 Requested Range Not Satisfiable (status code)" x:for-anchor=""/>
358  <iref primary="true" item="Status Codes" subitem="416 Requested Range Not Satisfiable" x:for-anchor=""/>
359<t>
360   A server &SHOULD; return a response with this status code if a request
361   included a Range request-header field (<xref target="header.range"/>), and none of
362   the range-specifier values in this field overlap the current extent
363   of the selected resource, and the request did not include an If-Range
364   request-header field. (For byte-ranges, this means that the first-byte-pos
365   of all of the byte-range-spec values were greater than the
366   current length of the selected resource.)
367</t>
368<t>
369   When this status code is returned for a byte-range request, the
370   response &SHOULD; include a Content-Range entity-header field
371   specifying the current length of the selected resource (see <xref target="header.content-range"/>).
372   This response &MUST-NOT; use the multipart/byteranges content-type.
373</t>
374</section>
375</section>
376
377<section title="Combining Byte Ranges" anchor="combining.byte.ranges">
378<t>
379   A response might transfer only a subrange of the bytes of an entity-body,
380   either because the request included one or more Range
381   specifications, or because a connection was broken prematurely. After
382   several such transfers, a cache might have received several ranges of
383   the same entity-body.
384</t>
385<t>
386   If a cache has a stored non-empty set of subranges for an entity, and
387   an incoming response transfers another subrange, the cache &MAY;
388   combine the new subrange with the existing set if both the following
389   conditions are met:
390  <list style="symbols">
391    <t>Both the incoming response and the cache entry have a cache
392        validator.</t>
393    <t>The two cache validators match using the strong comparison
394        function (see &weak-and-strong-validators;).</t>
395  </list>
396</t>
397<t>
398   If either requirement is not met, the cache &MUST; use only the most
399   recent partial response (based on the Date values transmitted with
400   every response, and using the incoming response if these values are
401   equal or missing), and &MUST; discard the other partial information.
402</t>
403</section>
404
405<section title="Header Field Definitions" anchor="header.fields">
406<t>
407   This section defines the syntax and semantics of HTTP/1.1 header fields
408   related to range requests and partial responses.
409</t>
410<t>
411   For entity-header fields, both sender and recipient refer to either the
412   client or the server, depending on who sends and who receives the entity.
413</t>
414
415<section title="Accept-Ranges" anchor="header.accept-ranges">
416  <iref primary="true" item="Accept-Ranges header" x:for-anchor=""/>
417  <iref primary="true" item="Headers" subitem="Accept-Ranges" x:for-anchor=""/>
418<t>
419      The Accept-Ranges response-header field allows the server to
420      indicate its acceptance of range requests for a resource:
421</t>
422<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Ranges"/><iref primary="true" item="Grammar" subitem="acceptable-ranges"/>
423  Accept-Ranges     = "Accept-Ranges" ":" acceptable-ranges
424  acceptable-ranges = 1#range-unit | "none"
425</artwork></figure>
426<t>
427      Origin servers that accept byte-range requests &MAY; send
428</t>
429<figure><artwork type="example">
430       Accept-Ranges: bytes
431</artwork></figure>
432<t>
433      but are not required to do so. Clients &MAY; generate byte-range
434      requests without having received this header for the resource
435      involved. Range units are defined in <xref target="range.units"/>.
436</t>
437<t>
438      Servers that do not accept any kind of range request for a
439      resource &MAY; send
440</t>
441<figure><artwork type="example">
442       Accept-Ranges: none
443</artwork></figure>
444<t>
445      to advise the client not to attempt a range request.
446</t>
447</section>
448
449<section title="Content-Range" anchor="header.content-range">
450  <iref primary="true" item="Content-Range header" x:for-anchor=""/>
451  <iref primary="true" item="Headers" subitem="Content-Range" x:for-anchor=""/>
452<t>
453   The Content-Range entity-header is sent with a partial entity-body to
454   specify where in the full entity-body the partial body should be
455   applied. Range units are defined in <xref target="range.units"/>.
456</t>
457<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Range"/><iref primary="true" item="Grammar" subitem="content-range-spec"/><iref primary="true" item="Grammar" subitem="byte-content-range-spec"/><iref primary="true" item="Grammar" subitem="byte-range-resp-spec"/><iref primary="true" item="Grammar" subitem="instance-length"/>
458  Content-Range = "Content-Range" ":" content-range-spec
459 
460  content-range-spec      = byte-content-range-spec
461  byte-content-range-spec = bytes-unit SP
462                            byte-range-resp-spec "/"
463                            ( instance-length | "*" )
464 
465  byte-range-resp-spec = (first-byte-pos "-" last-byte-pos)
466                                 | "*"
467  instance-length           = 1*DIGIT
468</artwork></figure>
469<t>
470   The header &SHOULD; indicate the total length of the full entity-body,
471   unless this length is unknown or difficult to determine. The asterisk
472   "*" character means that the instance-length is unknown at the time
473   when the response was generated.
474</t>
475<t>
476   Unlike byte-ranges-specifier values (see <xref target="byte.ranges"/>), a byte-range-resp-spec
477   &MUST; only specify one range, and &MUST; contain
478   absolute byte positions for both the first and last byte of the
479   range.
480</t>
481<t>
482   A byte-content-range-spec with a byte-range-resp-spec whose last-byte-pos
483   value is less than its first-byte-pos value, or whose
484   instance-length value is less than or equal to its last-byte-pos
485   value, is invalid. The recipient of an invalid byte-content-range-spec
486   &MUST; ignore it and any content transferred along with it.
487</t>
488<t>
489   A server sending a response with status code 416 (Requested range not
490   satisfiable) &SHOULD; include a Content-Range field with a byte-range-resp-spec
491   of "*". The instance-length specifies the current length of
492   the selected resource. A response with status code 206 (Partial
493   Content) &MUST-NOT; include a Content-Range field with a byte-range-resp-spec of "*".
494</t>
495<t>
496   Examples of byte-content-range-spec values, assuming that the entity
497   contains a total of 1234 bytes:
498   <list style="symbols">
499      <t>
500        The first 500 bytes:
501<figure><artwork type="text/plain">
502   bytes 0-499/1234
503</artwork></figure>
504      </t>   
505      <t>
506        The second 500 bytes:
507<figure><artwork type="text/plain">
508   bytes 500-999/1234
509</artwork></figure>
510      </t>   
511      <t>
512        All except for the first 500 bytes:
513<figure><artwork type="text/plain">
514   bytes 500-1233/1234
515</artwork></figure>
516      </t>   
517      <t>
518        The last 500 bytes:
519<figure><artwork type="text/plain">
520   bytes 734-1233/1234
521</artwork></figure>
522      </t>   
523   </list>
524</t>
525<t>
526   When an HTTP message includes the content of a single range (for
527   example, a response to a request for a single range, or to a request
528   for a set of ranges that overlap without any holes), this content is
529   transmitted with a Content-Range header, and a Content-Length header
530   showing the number of bytes actually transferred. For example,
531</t>
532<figure><artwork type="example">
533    HTTP/1.1 206 Partial Content
534    Date: Wed, 15 Nov 1995 06:25:24 GMT
535    Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
536    Content-Range: bytes 21010-47021/47022
537    Content-Length: 26012
538    Content-Type: image/gif
539</artwork></figure>
540<t>
541   When an HTTP message includes the content of multiple ranges (for
542   example, a response to a request for multiple non-overlapping
543   ranges), these are transmitted as a multipart message. The multipart
544   media type used for this purpose is "multipart/byteranges" as defined
545   in <xref target="internet.media.type.multipart.byteranges"/>. See <xref target="changes.from.rfc.2068"/> for a compatibility issue.
546</t>
547<t>
548   A response to a request for a single range &MUST-NOT; be sent using the
549   multipart/byteranges media type.  A response to a request for
550   multiple ranges, whose result is a single range, &MAY; be sent as a
551   multipart/byteranges media type with one part. A client that cannot
552   decode a multipart/byteranges message &MUST-NOT; ask for multiple
553   byte-ranges in a single request.
554</t>
555<t>
556   When a client requests multiple byte-ranges in one request, the
557   server &SHOULD; return them in the order that they appeared in the
558   request.
559</t>
560<t>
561   If the server ignores a byte-range-spec because it is syntactically
562   invalid, the server &SHOULD; treat the request as if the invalid Range
563   header field did not exist. (Normally, this means return a 200
564   response containing the full entity).
565</t>
566<t>
567   If the server receives a request (other than one including an If-Range
568   request-header field) with an unsatisfiable Range request-header
569   field (that is, all of whose byte-range-spec values have a
570   first-byte-pos value greater than the current length of the selected
571   resource), it &SHOULD; return a response code of 416 (Requested range
572   not satisfiable) (<xref target="status.416"/>).
573  <list><t>
574      <x:h>Note:</x:h> clients cannot depend on servers to send a 416 (Requested
575      range not satisfiable) response instead of a 200 (OK) response for
576      an unsatisfiable Range request-header, since not all servers
577      implement this request-header.
578  </t></list>
579</t>
580</section>
581
582<section title="If-Range" anchor="header.if-range">
583  <iref primary="true" item="If-Range header" x:for-anchor=""/>
584  <iref primary="true" item="Headers" subitem="If-Range" x:for-anchor=""/>
585<t>
586   If a client has a partial copy of an entity in its cache, and wishes
587   to have an up-to-date copy of the entire entity in its cache, it
588   could use the Range request-header with a conditional GET (using
589   either or both of If-Unmodified-Since and If-Match.) However, if the
590   condition fails because the entity has been modified, the client
591   would then have to make a second request to obtain the entire current
592   entity-body.
593</t>
594<t>
595   The If-Range header allows a client to "short-circuit" the second
596   request. Informally, its meaning is `if the entity is unchanged, send
597   me the part(s) that I am missing; otherwise, send me the entire new
598   entity'.
599</t>
600<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Range"/>
601  If-Range = "If-Range" ":" ( entity-tag | HTTP-date )
602</artwork></figure>
603<t>
604   If the client has no entity tag for an entity, but does have a Last-Modified
605   date, it &MAY; use that date in an If-Range header. (The
606   server can distinguish between a valid HTTP-date and any form of
607   entity-tag by examining no more than two characters.) The If-Range
608   header &SHOULD; only be used together with a Range header, and &MUST; be
609   ignored if the request does not include a Range header, or if the
610   server does not support the sub-range operation.
611</t>
612<t>
613   If the entity tag given in the If-Range header matches the current
614   entity tag for the entity, then the server &SHOULD; provide the
615   specified sub-range of the entity using a 206 (Partial Content)
616   response. If the entity tag does not match, then the server &SHOULD;
617   return the entire entity using a 200 (OK) response.
618</t>
619</section>
620
621<section title="Range" anchor="header.range">
622  <iref primary="true" item="Range header" x:for-anchor=""/>
623  <iref primary="true" item="Headers" subitem="Range" x:for-anchor=""/>
624
625<section title="Byte Ranges" anchor="byte.ranges">
626<t>
627   Since all HTTP entities are represented in HTTP messages as sequences
628   of bytes, the concept of a byte range is meaningful for any HTTP
629   entity. (However, not all clients and servers need to support byte-range
630   operations.)
631</t>
632<t>
633   Byte range specifications in HTTP apply to the sequence of bytes in
634   the entity-body (not necessarily the same as the message-body).
635</t>
636<t>
637   A byte range operation &MAY; specify a single range of bytes, or a set
638   of ranges within a single entity.
639</t>
640<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="ranges-specifier"/><iref primary="true" item="Grammar" subitem="byte-ranges-specifier"/><iref primary="true" item="Grammar" subitem="byte-range-set"/><iref primary="true" item="Grammar" subitem="byte-range-spec"/><iref primary="true" item="Grammar" subitem="first-byte-pos"/><iref primary="true" item="Grammar" subitem="last-byte-pos"/>
641  ranges-specifier = byte-ranges-specifier
642  byte-ranges-specifier = bytes-unit "=" byte-range-set
643  byte-range-set  = 1#( byte-range-spec | suffix-byte-range-spec )
644  byte-range-spec = first-byte-pos "-" [last-byte-pos]
645  first-byte-pos  = 1*DIGIT
646  last-byte-pos   = 1*DIGIT
647</artwork></figure>
648<t>
649   The first-byte-pos value in a byte-range-spec gives the byte-offset
650   of the first byte in a range. The last-byte-pos value gives the
651   byte-offset of the last byte in the range; that is, the byte
652   positions specified are inclusive. Byte offsets start at zero.
653</t>
654<t>
655   If the last-byte-pos value is present, it &MUST; be greater than or
656   equal to the first-byte-pos in that byte-range-spec, or the byte-range-spec
657   is syntactically invalid. The recipient of a byte-range-set
658   that includes one or more syntactically invalid byte-range-spec
659   values &MUST; ignore the header field that includes that byte-range-set.
660</t>
661<t>
662   If the last-byte-pos value is absent, or if the value is greater than
663   or equal to the current length of the entity-body, last-byte-pos is
664   taken to be equal to one less than the current length of the entity-body
665   in bytes.
666</t>
667<t>
668   By its choice of last-byte-pos, a client can limit the number of
669   bytes retrieved without knowing the size of the entity.
670</t>
671<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="suffix-byte-range-spec"/><iref primary="true" item="Grammar" subitem="suffix-length"/>
672  suffix-byte-range-spec = "-" suffix-length
673  suffix-length = 1*DIGIT
674</artwork></figure>
675<t>
676   A suffix-byte-range-spec is used to specify the suffix of the
677   entity-body, of a length given by the suffix-length value. (That is,
678   this form specifies the last N bytes of an entity-body.) If the
679   entity is shorter than the specified suffix-length, the entire
680   entity-body is used.
681</t>
682<t>
683   If a syntactically valid byte-range-set includes at least one byte-range-spec
684   whose first-byte-pos is less than the current length of
685   the entity-body, or at least one suffix-byte-range-spec with a non-zero
686   suffix-length, then the byte-range-set is satisfiable.
687   Otherwise, the byte-range-set is unsatisfiable. If the byte-range-set
688   is unsatisfiable, the server &SHOULD; return a response with a status
689   of 416 (Requested range not satisfiable). Otherwise, the server
690   &SHOULD; return a response with a status of 206 (Partial Content)
691   containing the satisfiable ranges of the entity-body.
692</t>
693<t>
694   Examples of byte-ranges-specifier values (assuming an entity-body of
695   length 10000):
696  <list style="symbols">
697     <t>The first 500 bytes (byte offsets 0-499, inclusive):  bytes=0-499</t>
698
699     <t>The second 500 bytes (byte offsets 500-999, inclusive):
700        bytes=500-999</t>
701
702     <t>The final 500 bytes (byte offsets 9500-9999, inclusive):
703        bytes=-500</t>
704
705     <t>Or bytes=9500-</t>
706
707     <t>The first and last bytes only (bytes 0 and 9999):  bytes=0-0,-1</t>
708
709     <t>Several legal but not canonical specifications of the second 500
710        bytes (byte offsets 500-999, inclusive):
711        <vspace/>
712         bytes=500-600,601-999<vspace/>
713         bytes=500-700,601-999</t>
714  </list>
715</t>
716</section>
717
718<section title="Range Retrieval Requests" anchor="range.retrieval.requests">
719<t>
720   HTTP retrieval requests using conditional or unconditional GET
721   methods &MAY; request one or more sub-ranges of the entity, instead of
722   the entire entity, using the Range request header, which applies to
723   the entity returned as the result of the request:
724</t>
725<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Range"/>
726  Range = "Range" ":" ranges-specifier
727</artwork></figure>
728<t>
729   A server &MAY; ignore the Range header. However, HTTP/1.1 origin
730   servers and intermediate caches ought to support byte ranges when
731   possible, since Range supports efficient recovery from partially
732   failed transfers, and supports efficient partial retrieval of large
733   entities.
734</t>
735<t>
736   If the server supports the Range header and the specified range or
737   ranges are appropriate for the entity:
738  <list style="symbols">
739     <t>The presence of a Range header in an unconditional GET modifies
740        what is returned if the GET is otherwise successful. In other
741        words, the response carries a status code of 206 (Partial
742        Content) instead of 200 (OK).</t>
743
744     <t>The presence of a Range header in a conditional GET (a request
745        using one or both of If-Modified-Since and If-None-Match, or
746        one or both of If-Unmodified-Since and If-Match) modifies what
747        is returned if the GET is otherwise successful and the
748        condition is true. It does not affect the 304 (Not Modified)
749        response returned if the conditional is false.</t>
750  </list>
751</t>
752<t>
753   In some cases, it might be more appropriate to use the If-Range
754   header (see <xref target="header.if-range"/>) in addition to the Range header.
755</t>
756<t>
757   If a proxy that supports ranges receives a Range request, forwards
758   the request to an inbound server, and receives an entire entity in
759   reply, it &SHOULD; only return the requested range to its client. It
760   &SHOULD; store the entire received response in its cache if that is
761   consistent with its cache allocation policies.
762</t>
763</section>
764</section>
765</section>
766
767<section title="IANA Considerations" anchor="IANA.considerations">
768<t>
769   <cref>TBD.</cref>
770</t>
771</section>
772
773<section title="Security Considerations" anchor="security.considerations">
774<t>
775   No additional security considerations have been identified beyond
776   those applicable to HTTP in general &messaging;.
777</t>
778</section>
779
780<section title="Acknowledgments" anchor="ack">
781<t>
782   Most of the specification of ranges is based on work originally done
783   by Ari Luotonen and John Franks, with additional input from Steve
784   Zilles, Daniel W. Connolly, Roy T. Fielding, Jim Gettys, Martin Hamilton,
785   Koen Holtman, Shel Kaplan, Paul Leach, Alex Lopez-Ortiz, Larry Masinter,
786   Jeff Mogul, Lou Montulli, David W. Morris, Luigi Rizzo, and Bill Weihl.
787</t>
788</section>
789</middle>
790<back>
791
792<references title="Normative References">
793
794<reference anchor="Part1">
795  <front>
796    <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
797    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
798      <organization abbrev="Day Software">Day Software</organization>
799      <address><email>fielding@gbiv.com</email></address>
800    </author>
801    <author initials="J." surname="Gettys" fullname="Jim Gettys">
802      <organization>One Laptop per Child</organization>
803      <address><email>jg@laptop.org</email></address>
804    </author>
805    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
806      <organization abbrev="HP">Hewlett-Packard Company</organization>
807      <address><email>JeffMogul@acm.org</email></address>
808    </author>
809    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
810      <organization abbrev="Microsoft">Microsoft Corporation</organization>
811      <address><email>henrikn@microsoft.com</email></address>
812    </author>
813    <author initials="L." surname="Masinter" fullname="Larry Masinter">
814      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
815      <address><email>LMM@acm.org</email></address>
816    </author>
817    <author initials="P." surname="Leach" fullname="Paul J. Leach">
818      <organization abbrev="Microsoft">Microsoft Corporation</organization>
819      <address><email>paulle@microsoft.com</email></address>
820    </author>
821    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
822      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
823      <address><email>timbl@w3.org</email></address>
824    </author>
825    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
826      <organization abbrev="W3C">World Wide Web Consortium</organization>
827      <address><email>ylafon@w3.org</email></address>
828    </author>
829    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
830      <organization abbrev="greenbytes">greenbytes GmbH</organization>
831      <address><email>julian.reschke@greenbytes.de</email></address>
832    </author>
833    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
834  </front>
835  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
836  <x:source href="p1-messaging.xml" basename="p1-messaging"/>
837</reference>
838
839<reference anchor="Part3">
840  <front>
841    <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
842    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
843      <organization abbrev="Day Software">Day Software</organization>
844      <address><email>fielding@gbiv.com</email></address>
845    </author>
846    <author initials="J." surname="Gettys" fullname="Jim Gettys">
847      <organization>One Laptop per Child</organization>
848      <address><email>jg@laptop.org</email></address>
849    </author>
850    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
851      <organization abbrev="HP">Hewlett-Packard Company</organization>
852      <address><email>JeffMogul@acm.org</email></address>
853    </author>
854    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
855      <organization abbrev="Microsoft">Microsoft Corporation</organization>
856      <address><email>henrikn@microsoft.com</email></address>
857    </author>
858    <author initials="L." surname="Masinter" fullname="Larry Masinter">
859      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
860      <address><email>LMM@acm.org</email></address>
861    </author>
862    <author initials="P." surname="Leach" fullname="Paul J. Leach">
863      <organization abbrev="Microsoft">Microsoft Corporation</organization>
864      <address><email>paulle@microsoft.com</email></address>
865    </author>
866    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
867      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
868      <address><email>timbl@w3.org</email></address>
869    </author>
870    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
871      <organization abbrev="W3C">World Wide Web Consortium</organization>
872      <address><email>ylafon@w3.org</email></address>
873    </author>
874    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
875      <organization abbrev="greenbytes">greenbytes GmbH</organization>
876      <address><email>julian.reschke@greenbytes.de</email></address>
877    </author>
878    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
879  </front>
880  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/>
881  <x:source href="p3-payload.xml" basename="p3-payload"/>
882</reference>
883
884<reference anchor="Part4">
885  <front>
886    <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
887    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
888      <organization abbrev="Day Software">Day Software</organization>
889      <address><email>fielding@gbiv.com</email></address>
890    </author>
891    <author initials="J." surname="Gettys" fullname="Jim Gettys">
892      <organization>One Laptop per Child</organization>
893      <address><email>jg@laptop.org</email></address>
894    </author>
895    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
896      <organization abbrev="HP">Hewlett-Packard Company</organization>
897      <address><email>JeffMogul@acm.org</email></address>
898    </author>
899    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
900      <organization abbrev="Microsoft">Microsoft Corporation</organization>
901      <address><email>henrikn@microsoft.com</email></address>
902    </author>
903    <author initials="L." surname="Masinter" fullname="Larry Masinter">
904      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
905      <address><email>LMM@acm.org</email></address>
906    </author>
907    <author initials="P." surname="Leach" fullname="Paul J. Leach">
908      <organization abbrev="Microsoft">Microsoft Corporation</organization>
909      <address><email>paulle@microsoft.com</email></address>
910    </author>
911    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
912      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
913      <address><email>timbl@w3.org</email></address>
914    </author>
915    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
916      <organization abbrev="W3C">World Wide Web Consortium</organization>
917      <address><email>ylafon@w3.org</email></address>
918    </author>
919    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
920      <organization abbrev="greenbytes">greenbytes GmbH</organization>
921      <address><email>julian.reschke@greenbytes.de</email></address>
922    </author>
923    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
924  </front>
925  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/>
926  <x:source href="p4-conditional.xml" basename="p4-conditional"/>
927</reference>
928
929<reference anchor="Part6">
930  <front>
931    <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
932    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
933      <organization abbrev="Day Software">Day Software</organization>
934      <address><email>fielding@gbiv.com</email></address>
935    </author>
936    <author initials="J." surname="Gettys" fullname="Jim Gettys">
937      <organization>One Laptop per Child</organization>
938      <address><email>jg@laptop.org</email></address>
939    </author>
940    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
941      <organization abbrev="HP">Hewlett-Packard Company</organization>
942      <address><email>JeffMogul@acm.org</email></address>
943    </author>
944    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
945      <organization abbrev="Microsoft">Microsoft Corporation</organization>
946      <address><email>henrikn@microsoft.com</email></address>
947    </author>
948    <author initials="L." surname="Masinter" fullname="Larry Masinter">
949      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
950      <address><email>LMM@acm.org</email></address>
951    </author>
952    <author initials="P." surname="Leach" fullname="Paul J. Leach">
953      <organization abbrev="Microsoft">Microsoft Corporation</organization>
954      <address><email>paulle@microsoft.com</email></address>
955    </author>
956    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
957      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
958      <address><email>timbl@w3.org</email></address>
959    </author>
960    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
961      <organization abbrev="W3C">World Wide Web Consortium</organization>
962      <address><email>ylafon@w3.org</email></address>
963    </author>
964    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
965      <organization abbrev="greenbytes">greenbytes GmbH</organization>
966      <address><email>julian.reschke@greenbytes.de</email></address>
967    </author>
968    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
969  </front>
970  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
971  <x:source href="p6-cache.xml" basename="p6-cache"/>
972</reference>
973
974<reference anchor="RFC2046">
975  <front>
976    <title abbrev="Media Types">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</title>
977    <author initials="N." surname="Freed" fullname="Ned Freed">
978      <organization>Innosoft International, Inc.</organization>
979      <address><email>ned@innosoft.com</email></address>
980    </author>
981    <author initials="N." surname="Borenstein" fullname="Nathaniel S. Borenstein">
982      <organization>First Virtual Holdings</organization>
983      <address><email>nsb@nsb.fv.com</email></address>
984    </author>
985    <date month="November" year="1996"/>
986  </front>
987  <seriesInfo name="RFC" value="2046"/>
988</reference>
989
990<reference anchor="RFC2119">
991  <front>
992    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
993    <author initials="S." surname="Bradner" fullname="Scott Bradner">
994      <organization>Harvard University</organization>
995      <address><email>sob@harvard.edu</email></address>
996    </author>
997    <date month="March" year="1997"/>
998  </front>
999  <seriesInfo name="BCP" value="14"/>
1000  <seriesInfo name="RFC" value="2119"/>
1001</reference>
1002
1003</references>
1004
1005<references title="Informative References">
1006
1007<reference anchor="RFC2616">
1008  <front>
1009    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1010    <author initials="R." surname="Fielding" fullname="R. Fielding">
1011      <organization>University of California, Irvine</organization>
1012      <address><email>fielding@ics.uci.edu</email></address>
1013    </author>
1014    <author initials="J." surname="Gettys" fullname="J. Gettys">
1015      <organization>W3C</organization>
1016      <address><email>jg@w3.org</email></address>
1017    </author>
1018    <author initials="J." surname="Mogul" fullname="J. Mogul">
1019      <organization>Compaq Computer Corporation</organization>
1020      <address><email>mogul@wrl.dec.com</email></address>
1021    </author>
1022    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
1023      <organization>MIT Laboratory for Computer Science</organization>
1024      <address><email>frystyk@w3.org</email></address>
1025    </author>
1026    <author initials="L." surname="Masinter" fullname="L. Masinter">
1027      <organization>Xerox Corporation</organization>
1028      <address><email>masinter@parc.xerox.com</email></address>
1029    </author>
1030    <author initials="P." surname="Leach" fullname="P. Leach">
1031      <organization>Microsoft Corporation</organization>
1032      <address><email>paulle@microsoft.com</email></address>
1033    </author>
1034    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
1035      <organization>W3C</organization>
1036      <address><email>timbl@w3.org</email></address>
1037    </author>
1038    <date month="June" year="1999"/>
1039  </front>
1040  <seriesInfo name="RFC" value="2616"/>
1041</reference>
1042
1043<reference anchor="RFC4288">
1044  <front>
1045    <title>Media Type Specifications and Registration Procedures</title>
1046    <author initials="N." surname="Freed" fullname="N. Freed">
1047      <organization>Sun Microsystems</organization>
1048      <address>
1049        <email>ned.freed@mrochek.com</email>
1050      </address>
1051    </author>
1052    <author initials="J." surname="Klensin" fullname="J. Klensin">
1053      <organization/>
1054      <address>
1055        <email>klensin+ietf@jck.com</email>
1056      </address>
1057    </author>
1058    <date year="2005" month="December"/>
1059  </front>
1060  <seriesInfo name="BCP" value="13"/>
1061  <seriesInfo name="RFC" value="4288"/>
1062</reference>
1063
1064</references>
1065
1066<section title="Internet Media Type multipart/byteranges" anchor="internet.media.type.multipart.byteranges">
1067<iref item="Media Type" subitem="multipart/byteranges" primary="true"/>
1068<iref item="multipart/byteranges Media Type" primary="true"/>
1069<t>
1070   When an HTTP 206 (Partial Content) response message includes the
1071   content of multiple ranges (a response to a request for multiple
1072   non-overlapping ranges), these are transmitted as a multipart
1073   message-body <xref target="RFC2046"/>. The media type for this purpose is called
1074   "multipart/byteranges".  The following is to be registered with IANA <xref target="RFC4288"/>.
1075</t><t>
1076   The multipart/byteranges media type includes two or more parts, each
1077   with its own Content-Type and Content-Range fields. The required
1078   boundary parameter specifies the boundary string used to separate
1079   each body-part.
1080</t>
1081<t>
1082  <list style="hanging" x:indent="12em">
1083    <t hangText="Type name:">
1084      multipart
1085    </t>
1086    <t hangText="Subtype name:">
1087      byteranges
1088    </t>
1089    <t hangText="Required parameters:">
1090      boundary
1091    </t>
1092    <t hangText="Optional parameters:">
1093      none
1094    </t>
1095    <t hangText="Encoding considerations:">
1096      only "7bit", "8bit", or "binary" are permitted
1097    </t>
1098    <t hangText="Security considerations:">
1099      none
1100    </t>
1101    <t hangText="Interoperability considerations:">
1102      none
1103    </t>
1104    <t hangText="Published specification:">
1105      This specification (see <xref target="internet.media.type.multipart.byteranges"/>).
1106    </t>
1107    <t hangText="Applications that use this media type:">
1108    </t>
1109    <t hangText="Additional information:">
1110      <list style="hanging">
1111        <t hangText="Magic number(s):">none</t>
1112        <t hangText="File extension(s):">none</t>
1113        <t hangText="Macintosh file type code(s):">none</t>
1114      </list>
1115    </t>
1116    <t hangText="Person and email address to contact for further information:">
1117      See Authors Section.
1118    </t>
1119                <t hangText="Intended usage:">
1120                  COMMON
1121    </t>
1122                <t hangText="Restrictions on usage:">
1123                  none
1124    </t>
1125    <t hangText="Author/Change controller:">
1126      IESG
1127    </t>
1128  </list>
1129</t>
1130<figure><preamble>
1131   For example:
1132</preamble><artwork type="example">
1133   HTTP/1.1 206 Partial Content
1134   Date: Wed, 15 Nov 1995 06:25:24 GMT
1135   Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
1136   Content-type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
1137
1138   --THIS_STRING_SEPARATES
1139   Content-type: application/pdf
1140   Content-range: bytes 500-999/8000
1141
1142   ...the first range...
1143   --THIS_STRING_SEPARATES
1144   Content-type: application/pdf
1145   Content-range: bytes 7000-7999/8000
1146
1147   ...the second range
1148   --THIS_STRING_SEPARATES--
1149</artwork></figure>
1150<t>
1151      Notes:
1152  <list style="numbers">
1153      <t>Additional CRLFs may precede the first boundary string in the
1154         entity.</t>
1155
1156      <t>Although <xref target="RFC2046"/> permits the boundary string to be
1157         quoted, some existing implementations handle a quoted boundary
1158         string incorrectly.</t>
1159
1160      <t>A number of browsers and servers were coded to an early draft
1161         of the byteranges specification to use a media type of
1162         multipart/x-byteranges<iref item="multipart/x-byteranges Media Type"/><iref item="Media Type" subitem="multipart/x-byteranges"/>, which is almost, but not quite
1163         compatible with the version documented in HTTP/1.1.</t>
1164  </list>
1165</t>
1166</section>
1167
1168<section title="Compatibility with Previous Versions" anchor="compatibility">
1169<section title="Changes from RFC 2068" anchor="changes.from.rfc.2068">
1170<t>
1171   Transfer-coding and message lengths all interact in ways that
1172   required fixing exactly when chunked encoding is used (to allow for
1173   transfer encoding that may not be self delimiting); it was important
1174   to straighten out exactly how message lengths are computed.
1175   (<xref target="header.content-range"/>,
1176   see also <xref target="Part1"/>, <xref target="Part3"/> and <xref target="Part6"/>)
1177</t>
1178<t>
1179   There are situations where a server (especially a proxy) does not
1180   know the full length of a response but is capable of serving a
1181   byterange request. We therefore need a mechanism to allow byteranges
1182   with a content-range not indicating the full length of the message.
1183   (<xref target="header.content-range"/>)
1184</t>
1185<t>
1186   Range request responses would become very verbose if all meta-data
1187   were always returned; by allowing the server to only send needed
1188   headers in a 206 response, this problem can be avoided.
1189   (Section <xref target="status.206" format="counter"/>
1190   and <xref target="header.if-range" format="counter"/>)
1191</t>
1192<t>
1193   Fix problem with unsatisfiable range requests; there are two cases:
1194   syntactic problems, and range doesn't exist in the document. The 416
1195   status code was needed to resolve this ambiguity needed to indicate
1196   an error for a byte range request that falls outside of the actual
1197   contents of a document. (Section <xref target="status.416" format="counter"/>, <xref target="header.content-range" format="counter"/>)
1198</t>
1199</section>
1200
1201<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
1202<t>
1203  Clarify that it is not ok to use a weak cache validator in a 206 response.
1204  (<xref target="status.206"/>)
1205</t>
1206</section>
1207
1208</section>
1209
1210<section title="Change Log (to be removed by RFC Editor before publication)">
1211
1212<section title="Since RFC2616">
1213<t>
1214  Extracted relevant partitions from <xref target="RFC2616"/>.
1215</t>
1216</section>
1217
1218<section title="Since draft-ietf-httpbis-p5-range-00">
1219<t>
1220  Closed issues:
1221  <list style="symbols"> 
1222    <t>
1223      <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/18"/>:
1224      "Cache validators in 206 responses"
1225      (<eref target="http://purl.org/NET/http-errata#ifrange206"/>)
1226    </t>
1227    <t>
1228      <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/35"/>:
1229      "Normative and Informative references"
1230    </t>
1231    <t>
1232      <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/86"/>:
1233      "Normative up-to-date references"
1234    </t>
1235  </list>
1236</t>
1237</section>
1238
1239<section title="Since draft-ietf-httpbis-p5-range-01">
1240<t>
1241  Closed issues:
1242  <list style="symbols"> 
1243    <t>
1244      <eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/55"/>:
1245      "Updating to RFC4288"
1246    </t>
1247  </list>
1248</t>
1249<t>
1250  Ongoing work on ABNF conversion (<eref target="http://www3.tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
1251  <list style="symbols"> 
1252    <t>
1253      Add explicit references to BNF syntax and rules imported from other parts of the specification.
1254    </t>
1255  </list>
1256</t>
1257</section>
1258
1259</section>
1260
1261</back>
1262</rfc>
Note: See TracBrowser for help on using the repository browser.