source: draft-ietf-httpbis/05/draft-ietf-httpbis-p5-range-05.xml @ 559

Last change on this file since 559 was 559, checked in by fielding@…, 10 years ago

remove executable and set eol-style for earlier drafts

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