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

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

fix mime types

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