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

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

(editorial) be more consistent when referring to a "body", preferring the
defined terms for message (body), payload (body), and representation (data).

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 58.8 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>">
[29]14  <!ENTITY ID-VERSION "latest">
[1845]15  <!ENTITY ID-MONTH "September">
[1497]16  <!ENTITY ID-YEAR "2012">
[1692]17  <!ENTITY Note "<x:h xmlns:x=''>Note:</x:h>">
[1452]18  <!ENTITY architecture               "<xref target='Part1' x:rel='#architecture' xmlns:x=''/>">
[1875]19  <!ENTITY conformance                "<xref target='Part1' x:rel='#conformance' xmlns:x=''/>">
[424]20  <!ENTITY notation                   "<xref target='Part1' x:rel='#notation' xmlns:x=''/>">
[1518]21  <!ENTITY abnf-extension             "<xref target='Part1' x:rel='#abnf.extension' xmlns:x=''/>">
[1364]22  <!ENTITY acks                       "<xref target='Part1' x:rel='#acks' xmlns:x=''/>">
[1518]23  <!ENTITY whitespace                 "<xref target='Part1' x:rel='#whitespace' xmlns:x=''/>">
24  <!ENTITY field-components           "<xref target='Part1' x:rel='#field.components' xmlns:x=''/>">
[1436]25  <!ENTITY http-date                  "<xref target='Part2' x:rel='' xmlns:x=''/>">
[31]26  <!ENTITY messaging                  "<xref target='Part1' xmlns:x=''/>">
[1260]27  <!ENTITY entity-tags                "<xref target='Part4' x:rel='#header.etag' xmlns:x=''/>">
[31]28  <!ENTITY weak-and-strong-validators "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x=''/>">
[1260]29  <!ENTITY lastmod-comparison         "<xref target='Part4' x:rel='#lastmod.comparison' xmlns:x=''/>">
[1524]30  <!ENTITY p6-heuristic               "<xref target='Part6' x:rel='#heuristic.freshness' xmlns:x=''/>">
32<?rfc toc="yes" ?>
[29]33<?rfc symrefs="yes" ?>
34<?rfc sortrefs="yes" ?>
[8]35<?rfc compact="yes"?>
36<?rfc subcompact="no" ?>
37<?rfc linkmailto="no" ?>
38<?rfc editing="no" ?>
[203]39<?rfc comments="yes"?>
40<?rfc inline="yes"?>
[799]41<?rfc rfcedstyle="yes"?>
[8]42<?rfc-ext allow-markup-in-artwork="yes" ?>
43<?rfc-ext include-references-in-index="yes" ?>
[1477]44<rfc obsoletes="2616" category="std" x:maturity-level="proposed"
45     ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p5-range-&ID-VERSION;"
46     xmlns:x=''>
[1472]47<x:link rel="prev" basename="p4-conditional"/>
48<x:link rel="next" basename="p6-cache"/>
[1522]49<x:feedback template="{docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>
[1864]52  <title abbrev="HTTP/1.1 Range Requests">Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
[29]54  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]55    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[8]56    <address>
57      <postal>
[1106]58        <street>345 Park Ave</street>
59        <city>San Jose</city>
[8]60        <region>CA</region>
[1106]61        <code>95110</code>
[29]62        <country>USA</country>
[8]63      </postal>
[29]64      <email></email>
65      <uri></uri>
[8]66    </address>
67  </author>
[95]69  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
[94]70    <organization abbrev="W3C">World Wide Web Consortium</organization>
71    <address>
72      <postal>
73        <street>W3C / ERCIM</street>
74        <street>2004, rte des Lucioles</street>
75        <city>Sophia-Antipolis</city>
76        <region>AM</region>
77        <code>06902</code>
78        <country>France</country>
79      </postal>
80      <email></email>
81      <uri></uri>
82    </address>
83  </author>
[95]85  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
86    <organization abbrev="greenbytes">greenbytes GmbH</organization>
87    <address>
88      <postal>
89        <street>Hafenweg 16</street>
90        <city>Muenster</city><region>NW</region><code>48155</code>
91        <country>Germany</country>
92      </postal>
[609]93      <email></email>
94      <uri></uri>
[95]95    </address>
96  </author>
[31]98  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
[440]99  <workgroup>HTTPbis Working Group</workgroup>
[1373]103   The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
[1808]104   distributed, collaborative, hypertext information systems. This document
105   defines range requests and the rules for constructing and combining
106   responses to those requests.
110<note title="Editorial Note (To be removed by RFC Editor)">
111  <t>
[1764]112    Discussion of this draft takes place on the HTTPBIS working group
[1268]113    mailing list (, which is archived at
114    <eref target=""/>.
115  </t>
116  <t>
117    The current issues list is at
118    <eref target=""/> and related
119    documents (including fancy diffs) can be found at
[324]120    <eref target=""/>.
[36]121  </t>
[153]122  <t>
[1807]123    The changes in this draft are summarized in <xref target="changes.since.20"/>.
[153]124  </t>
128<section title="Introduction" anchor="introduction">
[158]130   HTTP clients often encounter interrupted data transfers as a result
[1776]131   of canceled requests or dropped connections.  When a client has stored
[158]132   a partial representation, it is desirable to request the remainder
133   of that representation in a subsequent request rather than transfer
134   the entire representation.
135   There are also a number of Web applications that benefit from being
136   able to request only a subset of a larger representation, such as a
137   single page of a very large document or only part of an image to be
138   rendered by a device with limited local storage.
[163]141   This document defines HTTP/1.1 range requests,
[158]142   partial responses, and the multipart/byteranges media type.
[163]143   The protocol for range requests is an &OPTIONAL; feature of HTTP,
[158]144   designed so resources or recipients that do not implement this feature
145   can respond as if it is a normal GET request without impacting
146   interoperability.  Partial responses are indicated by a distinct status
147   code to not be mistaken for full responses by intermediate caches
148   that might not implement the feature.
[163]151   Although the HTTP range request mechanism is designed to allow for
[158]152   extensible range types, this specification only defines requests for
153   byte ranges.
[1875]156<section title="Conformance and Error Handling" anchor="conformance">
158   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
159   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
160   document are to be interpreted as described in <xref target="RFC2119"/>.
[1875]163   Conformance criteria and considerations regarding error handling
164   are defined in &conformance;.
[424]168<section title="Syntax Notation" anchor="notation">
[1518]170   This specification uses the Augmented Backus-Naur Form (ABNF) notation
171   of <xref target="RFC5234"/> with the list rule extension defined in
[1805]172   &notation;. <xref target="imported.abnf"/> describes rules imported from
173   other documents. <xref target="collected.abnf"/> shows the collected ABNF
[1518]174   with the list rule expanded.
[8]181<section title="Range Units" anchor="range.units">
[229]182  <x:anchor-alias value="bytes-unit"/>
183  <x:anchor-alias value="other-range-unit"/>
184  <x:anchor-alias value="range-unit"/>
[1260]186   HTTP/1.1 allows a client to request that only part (a range) of the
[874]187   representation be included within the response. HTTP/1.1 uses range
[1738]188   units in the <x:ref>Range</x:ref> (<xref target="header.range"/>) and
189   <x:ref>Content-Range</x:ref> (<xref target="header.content-range"/>)
[874]190   header fields. A representation can be broken down into subranges according
[8]191   to various structural units.
193<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]194  <x:ref>range-unit</x:ref>       = <x:ref>bytes-unit</x:ref> / <x:ref>other-range-unit</x:ref>
[229]195  <x:ref>bytes-unit</x:ref>       = "bytes"
196  <x:ref>other-range-unit</x:ref> = <x:ref>token</x:ref>
[393]199  HTTP/1.1 has been designed to allow implementations of applications
200  that do not depend on knowledge of ranges. The only range unit defined
[930]201  by HTTP/1.1 is "bytes". Additional specifiers can be defined as described
202  in <xref target="range.specifier.registry"/>.
[393]205  If a range unit is not understood in a request, a server &MUST; ignore
[1738]206  the whole <x:ref>Range</x:ref> header field (<xref target="header.range"/>).
[393]207  If a range unit is not understood in a response, an intermediary
208  &SHOULD; pass the response to the client; a client &MUST; fail.
211<section title="Range Specifier Registry" anchor="range.specifier.registry">
[1260]213   The HTTP Range Specifier Registry defines the name space for the range
[930]214   specifier names.
217   Registrations &MUST; include the following fields:
218   <list style="symbols">
219     <t>Name</t>
220     <t>Description</t>
221     <t>Pointer to specification text</t>
222   </list>
[1567]225  Values to be added to this name space require IETF Review
226  (see <xref target="RFC5226" x:fmt="," x:sec="4.1"/>).
229   The registry itself is maintained at
230   <eref target=""/>.
[838]236<section title="Status Code Definitions" anchor="status.code.definitions">
[8]237<section title="206 Partial Content" anchor="status.206">
238  <iref primary="true" item="206 Partial Content (status code)" x:for-anchor=""/>
[1732]239  <x:anchor-alias value="206"/>
[1708]240  <x:anchor-alias value="206 (Partial Content)"/>
242   The server has fulfilled the partial GET request for the resource.
[1738]243   The request &MUST; have included a <x:ref>Range</x:ref> header field
244   (<xref target="header.range"/>) indicating the desired range, and &MAY; have
245   included an <x:ref>If-Range</x:ref> header field
246   (<xref target="header.if-range"/>) to make the request conditional.
249   The response &MUST; include the following header fields:
250  <list style="symbols">
251    <t>
[1738]252        Either a <x:ref>Content-Range</x:ref> header field
253        (<xref target="header.content-range"/>) indicating
[8]254        the range included with this response, or a multipart/byteranges
[1740]255        <x:ref>Content-Type</x:ref> including Content-Range fields for each
256        part. If a <x:ref>Content-Length</x:ref> header field is present in the
257        response, its value &MUST; match the actual number of octets
258        transmitted in the message body.
[8]259    </t>
260    <t>
261        Date
262    </t>
263    <t>
[1739]264        <x:ref>Cache-Control</x:ref>, <x:ref>ETag</x:ref>,
[1740]265        <x:ref>Expires</x:ref>, <x:ref>Content-Location</x:ref> and/or
[1739]266        <x:ref>Vary</x:ref>, if the header field would have been sent in a
267        <x:ref>200 (OK)</x:ref> response to the same request
[8]268    </t>
269  </list>
[1738]272   If a 206 is sent in response to a request with an <x:ref>If-Range</x:ref>
273   header field, it &SHOULD-NOT; include other representation header fields.
274   Otherwise, the response &MUST; include all of the representation header
275   fields that would have been returned with a <x:ref>200 (OK)</x:ref> response
276   to the same request.
279   Caches &MAY; use a heuristic (see &p6-heuristic;) to determine
280   freshness for 206 responses.
284<section title="416 Requested Range Not Satisfiable" anchor="status.416">
285  <iref primary="true" item="416 Requested Range Not Satisfiable (status code)" x:for-anchor=""/>
[1708]286  <x:anchor-alias value="416 (Requested Range Not Satisfiable)"/>
288   A server &SHOULD; return a response with this status code if a request
[1738]289   included a <x:ref>Range</x:ref> header field (<xref target="header.range"/>),
290   and none of the ranges-specifier values in this field overlap the current
291   extent of the selected resource, and the request did not include an
292   <x:ref>If-Range</x:ref> header field (<xref target="header.if-range"/>).
293   (For byte-ranges, this means that the first-byte-pos of all of the
294   byte-range-spec values were greater than the current length of the selected
295   resource.)
298   When this status code is returned for a byte-range request, the
[1738]299   response &SHOULD; include a <x:ref>Content-Range</x:ref> header field
[965]300   specifying the current length of the representation (see <xref target="header.content-range"/>).
[1542]301   This response &MUST-NOT; use the multipart/byteranges content-type. For example,
[1543]303<figure><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
304HTTP/1.1 416 Requested Range Not Satisfiable
305Date: Mon, 20 Jan 2012 15:41:54 GMT
306Content-Range: bytes */47022
307Content-Type: image/gif
310  <t>
[1708]311    &Note; Clients cannot depend on servers to send a <x:ref>416 (Requested
[1715]312    Range Not Satisfiable)</x:ref> response instead of a <x:ref>200 (OK)</x:ref>
[1738]313    response for an unsatisfiable <x:ref>Range</x:ref> header field, since not
314    all servers implement this header field.
[1542]315  </t>
[1542]320<section title="Responses to a Range Request">
321<section title="Response to a Single and Multiple Ranges Request">
323   When an HTTP message includes the content of a single range (for
324   example, a response to a request for a single range, or to a request
325   for a set of ranges that overlap without any holes), this content is
[1738]326   transmitted with a <x:ref>Content-Range</x:ref> header field, and a
[1741]327   <x:ref>Content-Length</x:ref> header field showing the number of bytes
328   actually transferred. For example,
[1543]330<figure><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
331HTTP/1.1 206 Partial Content
332Date: Wed, 15 Nov 1995 06:25:24 GMT
333Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
334Content-Range: bytes 21010-47021/47022
335Content-Length: 26012
336Content-Type: image/gif
339   When an HTTP message includes the content of multiple ranges (for
340   example, a response to a request for multiple non-overlapping
341   ranges), these are transmitted as a multipart message. The multipart
342   media type used for this purpose is "multipart/byteranges" as defined
343   in <xref target=""/>.
346   A server &MAY; combine requested ranges when those ranges are overlapping
[1623]347   (see <xref target="overlapping.ranges"/>).
350   A response to a request for a single range &MUST-NOT; be sent using the
351   multipart/byteranges media type.  A response to a request for
352   multiple ranges, whose result is a single range, &MAY; be sent as a
353   multipart/byteranges media type with one part. A client that cannot
354   decode a multipart/byteranges message &MUST-NOT; ask for multiple
355   ranges in a single request.
[1623]358   When a client asks for multiple ranges in one request, the
[1542]359   server &SHOULD; return them in the order that they appeared in the
360   request.
[393]364<section title="Combining Ranges" anchor="combining.byte.ranges">
[1374]366   A response might transfer only a subrange of a representation if the
367   connection closed prematurely or if the request used one or more Range
368   specifications.  After several such transfers, a client might have
369   received several ranges of the same representation.  These ranges can only
370   be safely combined if they all have in common the same strong validator,
371   where "strong validator" is defined to be either an entity-tag that is
372   not marked as weak (&entity-tags;) or, if no entity-tag is provided, a
[1739]373   <x:ref>Last-Modified</x:ref> value that is strong in the sense defined by
[1374]374   &lastmod-comparison;.
[1715]377   When a client receives an incomplete <x:ref>200 (OK)</x:ref> or <x:ref>206 (Partial Content)</x:ref>
[1374]378   response and already has one or more stored responses for the same method
379   and effective request URI, all of the stored responses with the same
380   strong validator &MAY; be combined with the partial content in this new
381   response.  If none of the stored responses contain the same strong
382   validator, then this new response corresponds to a new representation
383   and &MUST-NOT; be combined with the existing stored responses.
[1715]386   If the new response is an incomplete <x:ref>200 (OK)</x:ref> response, then the header
[1374]387   fields of that new response are used for any combined response and replace
388   those of the matching stored responses.
[1708]391   If the new response is a <x:ref>206 (Partial Content)</x:ref> response and at least one
[1715]392   of the matching stored responses is a <x:ref>200 (OK)</x:ref>, then the combined response
[1374]393   header fields consist of the most recent 200 response's header fields.
[1735]394   If all of the matching stored responses are 206 responses, then the
[1374]395   stored response with the most header fields is used as the source of
396   header fields for the combined response, except that the client &MUST;
397   use other header fields provided in the new response, aside from
[1738]398   <x:ref>Content-Range</x:ref>, to replace all instances of the corresponding
399   header fields in the stored response.
[1544]402   The combined response message body consists of the union of partial
[1374]403   content ranges in the new response and each of the selected responses.
404   If the union consists of the entire range of the representation, then the
[1741]405   combined response &MUST; be recorded as a complete <x:ref>200 (OK)</x:ref>
406   response with a <x:ref>Content-Length</x:ref> header field that reflects the
407   complete length. Otherwise, the combined response(s) &MUST; include a
408   <x:ref>Content-Range</x:ref> header field describing the included range(s)
409   and be recorded as incomplete.  If the union consists of a discontinuous
410   range of the representation, then the client &MAY; store it as either a
411   multipart range response or as multiple <x:ref>206</x:ref> responses with
412   one continuous range each.
[1415]417<section title="Header Field Definitions" anchor="header.field.definitions">
[117]419   This section defines the syntax and semantics of HTTP/1.1 header fields
420   related to range requests and partial responses.
[8]423<section title="Accept-Ranges" anchor="header.accept-ranges">
[1120]424  <iref primary="true" item="Accept-Ranges header field" x:for-anchor=""/>
[229]425  <x:anchor-alias value="Accept-Ranges"/>
426  <x:anchor-alias value="acceptable-ranges"/>
[1163]428   The "Accept-Ranges" header field allows a resource to indicate
[698]429   its acceptance of range requests.
[1232]431<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Ranges"/><iref primary="true" item="Grammar" subitem="acceptable-ranges"/>
432  <x:ref>Accept-Ranges</x:ref>     = <x:ref>acceptable-ranges</x:ref>
[334]433  <x:ref>acceptable-ranges</x:ref> = 1#<x:ref>range-unit</x:ref> / "none"
[1772]436   Origin servers that accept byte-range requests &MAY; send
438<figure><artwork type="example">
[363]439  Accept-Ranges: bytes
[1772]442   but are not required to do so. Clients &MAY; generate range
443   requests without having received this header field for the resource
444   involved. Range units are defined in <xref target="range.units"/>.
[1772]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
[1772]454   to advise the client not to attempt a range request.
458<section title="Content-Range" anchor="header.content-range">
[1120]459  <iref primary="true" item="Content-Range header field" x:for-anchor=""/>
[229]460  <x:anchor-alias value="byte-content-range-spec"/>
461  <x:anchor-alias value="byte-range-resp-spec"/>
462  <x:anchor-alias value="Content-Range"/>
463  <x:anchor-alias value="instance-length"/>
[393]464  <x:anchor-alias value="other-content-range-spec"/>
465  <x:anchor-alias value="other-range-resp-spec"/>
[965]467   The "Content-Range" header field is sent with a partial representation to
[969]468   specify where in the full representation the payload body is intended to be
[962]469   applied.
472   Range units are defined in <xref target="range.units"/>.
[1398]474<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Range"/><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"/>
475  <x:ref>Content-Range</x:ref>           = <x:ref>byte-content-range-spec</x:ref>
[434]476                          / <x:ref>other-content-range-spec</x:ref>
[229]478  <x:ref>byte-content-range-spec</x:ref> = <x:ref>bytes-unit</x:ref> <x:ref>SP</x:ref>
479                            <x:ref>byte-range-resp-spec</x:ref> "/"
[334]480                            ( <x:ref>instance-length</x:ref> / "*" )
[304]482  <x:ref>byte-range-resp-spec</x:ref>    = (<x:ref>first-byte-pos</x:ref> "-" <x:ref>last-byte-pos</x:ref>)
[334]483                          / "*"
485  <x:ref>instance-length</x:ref>         = 1*<x:ref>DIGIT</x:ref>
487  <x:ref>other-content-range-spec</x:ref> = <x:ref>other-range-unit</x:ref> <x:ref>SP</x:ref>
488                             <x:ref>other-range-resp-spec</x:ref>
489  <x:ref>other-range-resp-spec</x:ref>    = *<x:ref>CHAR</x:ref>
[994]492   The header field &SHOULD; indicate the total length of the full representation,
[8]493   unless this length is unknown or difficult to determine. The asterisk
494   "*" character means that the instance-length is unknown at the time
495   when the response was generated.
498   Unlike byte-ranges-specifier values (see <xref target="byte.ranges"/>), a byte-range-resp-spec
499   &MUST; only specify one range, and &MUST; contain
500   absolute byte positions for both the first and last byte of the
501   range.
504   A byte-content-range-spec with a byte-range-resp-spec whose last-byte-pos
505   value is less than its first-byte-pos value, or whose
506   instance-length value is less than or equal to its last-byte-pos
507   value, is invalid. The recipient of an invalid byte-content-range-spec
508   &MUST; ignore it and any content transferred along with it.
[393]511   In the case of a byte range request:
[1708]512   A server sending a response with status code <x:ref>416 (Requested Range Not
513   Satisfiable)</x:ref> &SHOULD; include a Content-Range field with a byte-range-resp-spec
[8]514   of "*". The instance-length specifies the current length of
[1708]515   the selected resource. A response with status code <x:ref>206 (Partial Content)</x:ref>
516   &MUST-NOT; include a Content-Range field with a byte-range-resp-spec of "*".
[1461]519  The "Content-Range" header field has no meaning for status codes that do not
[1459]520  explicitly describe its semantic. Currently, only status codes
[1708]521  <x:ref>206 (Partial Content)</x:ref> and <x:ref>416 (Requested Range Not Satisfiable)</x:ref> describe
[1459]522  the meaning of this header field.
[866]525   Examples of byte-content-range-spec values, assuming that the representation
[8]526   contains a total of 1234 bytes:
527   <list style="symbols">
528      <t>
529        The first 500 bytes:
[565]530<figure><artwork type="example" x:indent-with="   ">
531  bytes 0-499/1234
533      </t>   
534      <t>
535        The second 500 bytes:
[565]536<figure><artwork type="example" x:indent-with="   ">
537  bytes 500-999/1234
539      </t>   
540      <t>
541        All except for the first 500 bytes:
[565]542<figure><artwork type="example" x:indent-with="   ">
543  bytes 500-1233/1234
545      </t>   
546      <t>
547        The last 500 bytes:
[565]548<figure><artwork type="example" x:indent-with="   ">
549  bytes 734-1233/1234
551      </t>   
552   </list>
[1542]555   If the server ignores a byte-range-spec (for example if it is
[1685]556   syntactically invalid, or if it might be seen as a denial-of-service
[1738]557   attack), the server &SHOULD; treat the request as if the invalid <x:ref>Range</x:ref>
[1715]558   header field did not exist. (Normally, this means return a <x:ref>200 (OK)</x:ref>
[874]559   response containing the full representation).
563<section title="If-Range" anchor="header.if-range">
[1120]564  <iref primary="true" item="If-Range header field" x:for-anchor=""/>
[229]565  <x:anchor-alias value="If-Range"/>
[1374]567   If a client has a partial copy of a representation and wishes
[1738]568   to have an up-to-date copy of the entire representation, it could use the
569   <x:ref>Range</x:ref> header field with a conditional GET (using
[1739]570   either or both of <x:ref>If-Unmodified-Since</x:ref> and
571   <x:ref>If-Match</x:ref>.) However, if the condition fails because the
572   representation has been modified, the client would then have to make a
573   second request to obtain the entire current representation.
[1163]576   The "If-Range" header field allows a client to "short-circuit" the second
[866]577   request. Informally, its meaning is "if the representation is unchanged, send
[8]578   me the part(s) that I am missing; otherwise, send me the entire new
[866]579   representation".
[1232]581<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Range"/>
582  <x:ref>If-Range</x:ref> = <x:ref>entity-tag</x:ref> / <x:ref>HTTP-date</x:ref>
[1374]585   Clients &MUST-NOT; use an entity-tag marked as weak in an If-Range
[1739]586   field value and &MUST-NOT; use a <x:ref>Last-Modified</x:ref> date in an
587   If-Range field value unless it has no entity-tag for the representation and
[1374]588   the Last-Modified date it does have for the representation is strong
589   in the sense defined by &lastmod-comparison;.
[1374]592   A server that evaluates a conditional range request that is applicable
593   to one of its representations &MUST; evaluate the condition as false if
594   the entity-tag used as a validator is marked as weak or, when an HTTP-date
595   is used as the validator, if the date value is not strong in the sense
596   defined by &lastmod-comparison;. (A server can distinguish between a
597   valid HTTP-date and any form of entity-tag by examining the first
598   two characters.)
[1374]601   The If-Range header field &SHOULD; only be sent by clients together with
602   a Range header field.  The If-Range header field &MUST; be ignored if it
603   is received in a request that does not include a Range header field.
604   The If-Range header field &MUST; be ignored by a server that does not
605   support the sub-range operation.
[1374]608   If the validator given in the If-Range header field matches the current
609   validator for the selected representation of the target resource, then
610   the server &SHOULD; send the specified sub-range of the representation
[1708]611   using a <x:ref>206 (Partial Content)</x:ref> response. If the validator does not match,
[1715]612   then the server &SHOULD; send the entire representation using a <x:ref>200 (OK)</x:ref>
[1374]613   response.
617<section title="Range" anchor="header.range">
[1120]618  <iref primary="true" item="Range header field" x:for-anchor=""/>
620<section title="Byte Ranges" anchor="byte.ranges">
[866]622   Since all HTTP representations are transferred as sequences
[8]623   of bytes, the concept of a byte range is meaningful for any HTTP
[866]624   representation. (However, not all clients and servers need to support byte-range
[8]625   operations.)
628   Byte range specifications in HTTP apply to the sequence of bytes in
[1910]629   the representation data (not necessarily the same as the message body).
[229]631<t anchor="rule.ranges-specifier">
632  <x:anchor-alias value="byte-range-set"/>
633  <x:anchor-alias value="byte-range-spec"/>
634  <x:anchor-alias value="byte-ranges-specifier"/>
635  <x:anchor-alias value="first-byte-pos"/>
636  <x:anchor-alias value="last-byte-pos"/>
637  <x:anchor-alias value="ranges-specifier"/>
638  <x:anchor-alias value="suffix-byte-range-spec"/>
639  <x:anchor-alias value="suffix-length"/>
[8]640   A byte range operation &MAY; specify a single range of bytes, or a set
[866]641   of ranges within a single representation.
643<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]644  <x:ref>byte-ranges-specifier</x:ref> = <x:ref>bytes-unit</x:ref> "=" <x:ref>byte-range-set</x:ref>
[334]645  <x:ref>byte-range-set</x:ref>  = 1#( <x:ref>byte-range-spec</x:ref> / <x:ref>suffix-byte-range-spec</x:ref> )
[434]646  <x:ref>byte-range-spec</x:ref> = <x:ref>first-byte-pos</x:ref> "-" [ <x:ref>last-byte-pos</x:ref> ]
[229]647  <x:ref>first-byte-pos</x:ref>  = 1*<x:ref>DIGIT</x:ref>
648  <x:ref>last-byte-pos</x:ref>   = 1*<x:ref>DIGIT</x:ref>
651   The first-byte-pos value in a byte-range-spec gives the byte-offset
652   of the first byte in a range. The last-byte-pos value gives the
653   byte-offset of the last byte in the range; that is, the byte
[576]654   positions specified are inclusive. Byte offsets start at zero.
657   If the last-byte-pos value is present, it &MUST; be greater than or
658   equal to the first-byte-pos in that byte-range-spec, or the byte-range-spec
659   is syntactically invalid. The recipient of a byte-range-set
660   that includes one or more syntactically invalid byte-range-spec
661   values &MUST; ignore the header field that includes that byte-range-set.
664   If the last-byte-pos value is absent, or if the value is greater than
[1910]665   or equal to the current length of the representation data, last-byte-pos is
[866]666   taken to be equal to one less than the current length of the representation
[8]667   in bytes.
670   By its choice of last-byte-pos, a client can limit the number of
[866]671   bytes retrieved without knowing the size of the representation.
673<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="suffix-byte-range-spec"/><iref primary="true" item="Grammar" subitem="suffix-length"/>
[229]674  <x:ref>suffix-byte-range-spec</x:ref> = "-" <x:ref>suffix-length</x:ref>
675  <x:ref>suffix-length</x:ref> = 1*<x:ref>DIGIT</x:ref>
678   A suffix-byte-range-spec is used to specify the suffix of the
[1910]679   representation data, of a length given by the suffix-length value. (That is,
[874]680   this form specifies the last N bytes of a representation.) If the
[866]681   representation is shorter than the specified suffix-length, the entire
682   representation is used.
685   If a syntactically valid byte-range-set includes at least one byte-range-spec
686   whose first-byte-pos is less than the current length of
[874]687   the representation, or at least one suffix-byte-range-spec with a non-zero
[8]688   suffix-length, then the byte-range-set is satisfiable.
689   Otherwise, the byte-range-set is unsatisfiable. If the byte-range-set
[926]690   is unsatisfiable, the server &SHOULD; return a response with a
[1708]691   <x:ref>416 (Requested Range Not Satisfiable)</x:ref> status code. Otherwise, the server
692   &SHOULD; return a response with a <x:ref>206 (Partial Content)</x:ref> status code
[866]693   containing the satisfiable ranges of the representation.
[1767]696   In the byte range syntax, <x:ref>first-byte-pos</x:ref>,
697   <x:ref>last-byte-pos</x:ref>, and <x:ref>suffix-length</x:ref> are
698   expressed as decimal number of octets.  Since there is no predefined limit
699   to the length of an HTTP payload, recipients &SHOULD; anticipate
700   potentially large decimal numerals and prevent parsing errors due to integer
701   conversion overflows.
[874]704   Examples of byte-ranges-specifier values (assuming a representation of
[8]705   length 10000):
706  <list style="symbols">
[565]707     <t>The first 500 bytes (byte offsets 0-499, inclusive):
708<figure><artwork type="example" x:indent-with="   ">
709  bytes=0-499
711    </t>
[8]712     <t>The second 500 bytes (byte offsets 500-999, inclusive):
[565]713<figure><artwork type="example" x:indent-with="   ">
714  bytes=500-999
716    </t>
[8]717     <t>The final 500 bytes (byte offsets 9500-9999, inclusive):
[565]718<figure><artwork type="example" x:indent-with="   ">
719  bytes=-500
721    Or:
722<figure><artwork type="example" x:indent-with="   ">
723  bytes=9500-
725    </t>
726     <t>The first and last bytes only (bytes 0 and 9999):
727<figure><artwork type="example" x:indent-with="   ">
728  bytes=0-0,-1
730     </t>
[8]731     <t>Several legal but not canonical specifications of the second 500
732        bytes (byte offsets 500-999, inclusive):
[565]733<figure><artwork type="example" x:indent-with="   ">
734  bytes=500-600,601-999
735  bytes=500-700,601-999
737     </t>
[8]738  </list>
742<section title="Range Retrieval Requests" anchor="range.retrieval.requests">
[229]743  <x:anchor-alias value="Range"/>
[564]744  <x:anchor-alias value="other-ranges-specifier"/>
[637]745  <x:anchor-alias value="other-range-set"/>
[1163]747   The "Range" header field defines the GET method (conditional or
[1910]748   not) to request one or more sub-ranges of the response representation data, instead
749   of the entire representation data.
[393]751<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Range"/>
[1232]752  <x:ref>Range</x:ref> = <x:ref>byte-ranges-specifier</x:ref> / <x:ref>other-ranges-specifier</x:ref>
[637]753  <x:ref>other-ranges-specifier</x:ref> = <x:ref>other-range-unit</x:ref> "=" <x:ref>other-range-set</x:ref>
754  <x:ref>other-range-set</x:ref> = 1*<x:ref>CHAR</x:ref>
[1374]757   A server &MAY; ignore the Range header field. However, origin
[8]758   servers and intermediate caches ought to support byte ranges when
759   possible, since Range supports efficient recovery from partially
760   failed transfers, and supports efficient partial retrieval of large
[874]761   representations.
[994]764   If the server supports the Range header field and the specified range or
[874]765   ranges are appropriate for the representation:
[8]766  <list style="symbols">
[994]767     <t>The presence of a Range header field in an unconditional GET modifies
[8]768        what is returned if the GET is otherwise successful. In other
[1708]769        words, the response carries a status code of <x:ref>206 (Partial Content)</x:ref>
[1715]770        instead of <x:ref>200 (OK)</x:ref>.</t>
[994]772     <t>The presence of a Range header field in a conditional GET (a request
[1739]773        using one or both of <x:ref>If-Modified-Since</x:ref> and
774        <x:ref>If-None-Match</x:ref>, or one or both of
775        <x:ref>If-Unmodified-Since</x:ref> and <x:ref>If-Match</x:ref>) modifies
776        what is returned if the GET is otherwise successful and the
[1734]777        condition is true. It does not affect the <x:ref>304 (Not Modified)</x:ref>
[8]778        response returned if the conditional is false.</t>
779  </list>
782   In some cases, it might be more appropriate to use the If-Range
[994]783   header field (see <xref target="header.if-range"/>) in addition to the Range
784   header field.
[1014]787   If a proxy that supports ranges receives a Range request, forwards
[874]788   the request to an inbound server, and receives an entire representation in
[1014]789   reply, it &MAY; only return the requested range to its client.
[29]795<section title="IANA Considerations" anchor="IANA.considerations">
797<section title="Status Code Registration" anchor="status.code.registration">
799   The HTTP Status Code Registry located at <eref target=""/>
[969]800   shall be updated with the registrations below:
802<?BEGININC p5-range.iana-status-codes ?>
803<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
804<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
805   <ttcol>Value</ttcol>
806   <ttcol>Description</ttcol>
807   <ttcol>Reference</ttcol>
808   <c>206</c>
809   <c>Partial Content</c>
810   <c>
811      <xref target="status.206"/>
812   </c>
813   <c>416</c>
814   <c>Requested Range Not Satisfiable</c>
815   <c>
816      <xref target="status.416"/>
817   </c>
820<?ENDINC p5-range.iana-status-codes ?>
[921]823<section title="Header Field Registration" anchor="header.field.registration">
[969]825   The Message Header Field Registry located at <eref target=""/> shall be updated
[290]826   with the permanent registrations below (see <xref target="RFC3864"/>):
[680]828<?BEGININC p5-range.iana-headers ?>
[253]829<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
[290]830<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
[253]831   <ttcol>Header Field Name</ttcol>
832   <ttcol>Protocol</ttcol>
833   <ttcol>Status</ttcol>
834   <ttcol>Reference</ttcol>
836   <c>Accept-Ranges</c>
837   <c>http</c>
838   <c>standard</c>
839   <c>
840      <xref target="header.accept-ranges"/>
841   </c>
842   <c>Content-Range</c>
843   <c>http</c>
844   <c>standard</c>
845   <c>
846      <xref target="header.content-range"/>
847   </c>
848   <c>If-Range</c>
849   <c>http</c>
850   <c>standard</c>
851   <c>
852      <xref target="header.if-range"/>
853   </c>
854   <c>Range</c>
855   <c>http</c>
856   <c>standard</c>
857   <c>
858      <xref target="header.range"/>
859   </c>
[680]862<?ENDINC p5-range.iana-headers ?>
[290]864   The change controller is: "IETF ( - Internet Engineering Task Force".
868<section title="Range Specifier Registration" anchor="range.specifier.registration">
870  The registration procedure for HTTP Range Specifiers is defined by
871  <xref target="range.specifier.registry"/> of this document.
[969]874   The HTTP Range Specifier Registry shall be created at <eref target=""/>
[930]875   and be populated with the registrations below:
877<texttable align="left" suppress-title="true" anchor="iana.range.specifiers.table">
878   <ttcol>Range Specifier Name</ttcol>
879   <ttcol>Description</ttcol>
880   <ttcol>Reference</ttcol>
882   <c>bytes</c>
883   <c>a range of octets</c>
[1748]884   <c><xref target="range.units"/></c>
886   <c>none</c>
887   <c>reserved as keyword, indicating no ranges are supported</c>
888   <c><xref target="header.accept-ranges"/></c>
891   The change controller is: "IETF ( - Internet Engineering Task Force".
896<section title="Security Considerations" anchor="security.considerations">
[1355]898   This section is meant to inform application developers, information
899   providers, and users of the security limitations in HTTP/1.1 as
900   described by this document. The discussion does not include
901   definitive solutions to the problems revealed, though it does make
902   some suggestions for reducing security risks.
[1355]904<section title="Overlapping Ranges" anchor="overlapping.ranges">
[1685]906   Range requests containing overlapping ranges can lead to the situation
[1355]907   where a server is sending far more data than the size of the complete
908   resource representation.
[1364]913<section title="Acknowledgments" anchor="acks">
[1364]915  See &acks;.
[119]921<references title="Normative References">
[31]923<reference anchor="Part1">
[119]924  <front>
[1864]925    <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
[119]926    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]927      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]928      <address><email></email></address>
929    </author>
930    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
931      <organization abbrev="W3C">World Wide Web Consortium</organization>
932      <address><email></email></address>
933    </author>
934    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
935      <organization abbrev="greenbytes">greenbytes GmbH</organization>
936      <address><email></email></address>
937    </author>
938    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
939  </front>
940  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
[1740]941  <x:source href="p1-messaging.xml" basename="p1-messaging">
942    <x:defines>Content-Length</x:defines>
943  </x:source>
[1436]946<reference anchor="Part2">
947  <front>
[1864]948    <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
[1436]949    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
950      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
951      <address><email></email></address>
952    </author>
953    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
954      <organization abbrev="W3C">World Wide Web Consortium</organization>
955      <address><email></email></address>
956    </author>
957    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
958      <organization abbrev="greenbytes">greenbytes GmbH</organization>
959      <address><email></email></address>
960    </author>
961    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
962  </front>
963  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
[1715]964  <x:source href="p2-semantics.xml" basename="p2-semantics">
965    <x:defines>200 (OK)</x:defines>
[1735]966    <x:defines>410 (Gone)</x:defines>
[1740]967    <x:defines>Content-Location</x:defines>
968    <x:defines>Content-Type</x:defines>
969    <x:defines>Location</x:defines>
[1860]970    <x:defines>Vary</x:defines>
[1715]971  </x:source>
[31]974<reference anchor="Part4">
[119]975  <front>
[1864]976    <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
[119]977    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]978      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]979      <address><email></email></address>
980    </author>
981    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
982      <organization abbrev="W3C">World Wide Web Consortium</organization>
983      <address><email></email></address>
984    </author>
985    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
986      <organization abbrev="greenbytes">greenbytes GmbH</organization>
987      <address><email></email></address>
988    </author>
989    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
990  </front>
991  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/>
[1734]992  <x:source href="p4-conditional.xml" basename="p4-conditional">
993    <x:defines>304 (Not Modified)</x:defines>
[1739]994    <x:defines>ETag</x:defines>
995    <x:defines>If-Match</x:defines>
996    <x:defines>If-Modified-Since</x:defines>
997    <x:defines>If-None-Match</x:defines>
998    <x:defines>If-Unmodified-Since</x:defines>
999    <x:defines>Last-Modified</x:defines>
[1734]1000  </x:source>
[1524]1003<reference anchor="Part6">
1004  <front>
[1864]1005    <title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
[1524]1006    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1007      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1008      <address><email></email></address>
1009    </author>
1010    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1011      <organization abbrev="W3C">World Wide Web Consortium</organization>
1012      <address><email></email></address>
1013    </author>
1014    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
1015      <address><email></email></address>
1016    </author>
1017    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1018      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1019      <address><email></email></address>
1020    </author>
1021    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1022  </front>
1023  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
[1737]1024  <x:source href="p6-cache.xml" basename="p6-cache">
[1739]1025    <x:defines>Cache-Control</x:defines>
[1737]1026    <x:defines>Expires</x:defines>
1027  </x:source>
[131]1030<reference anchor="RFC2046">
1031  <front>
1032    <title abbrev="Media Types">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</title>
1033    <author initials="N." surname="Freed" fullname="Ned Freed">
1034      <organization>Innosoft International, Inc.</organization>
1035      <address><email></email></address>
1036    </author>
1037    <author initials="N." surname="Borenstein" fullname="Nathaniel S. Borenstein">
1038      <organization>First Virtual Holdings</organization>
1039      <address><email></email></address>
1040    </author>
1041    <date month="November" year="1996"/>
1042  </front>
1043  <seriesInfo name="RFC" value="2046"/>
[119]1046<reference anchor="RFC2119">
1047  <front>
1048    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1049    <author initials="S." surname="Bradner" fullname="Scott Bradner">
1050      <organization>Harvard University</organization>
1051      <address><email></email></address>
1052    </author>
1053    <date month="March" year="1997"/>
1054  </front>
1055  <seriesInfo name="BCP" value="14"/>
1056  <seriesInfo name="RFC" value="2119"/>
[425]1059<reference anchor="RFC5234">
1060  <front>
1061    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
1062    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
1063      <organization>Brandenburg InternetWorking</organization>
1064      <address>
[728]1065        <email></email>
1066      </address> 
[425]1067    </author>
1068    <author initials="P." surname="Overell" fullname="Paul Overell">
1069      <organization>THUS plc.</organization>
1070      <address>
[728]1071        <email></email>
1072      </address>
[425]1073    </author>
1074    <date month="January" year="2008"/>
1075  </front>
1076  <seriesInfo name="STD" value="68"/>
1077  <seriesInfo name="RFC" value="5234"/>
1082<references title="Informative References">
[36]1084<reference anchor="RFC2616">
[119]1085  <front>
1086    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1087    <author initials="R." surname="Fielding" fullname="R. Fielding">
1088      <organization>University of California, Irvine</organization>
1089      <address><email></email></address>
1090    </author>
1091    <author initials="J." surname="Gettys" fullname="J. Gettys">
1092      <organization>W3C</organization>
1093      <address><email></email></address>
1094    </author>
1095    <author initials="J." surname="Mogul" fullname="J. Mogul">
1096      <organization>Compaq Computer Corporation</organization>
1097      <address><email></email></address>
1098    </author>
1099    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
1100      <organization>MIT Laboratory for Computer Science</organization>
1101      <address><email></email></address>
1102    </author>
1103    <author initials="L." surname="Masinter" fullname="L. Masinter">
1104      <organization>Xerox Corporation</organization>
1105      <address><email></email></address>
1106    </author>
1107    <author initials="P." surname="Leach" fullname="P. Leach">
1108      <organization>Microsoft Corporation</organization>
1109      <address><email></email></address>
1110    </author>
1111    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
1112      <organization>W3C</organization>
1113      <address><email></email></address>
1114    </author>
1115    <date month="June" year="1999"/>
1116  </front>
1117  <seriesInfo name="RFC" value="2616"/>
[253]1120<reference anchor='RFC3864'>
1121  <front>
1122    <title>Registration Procedures for Message Header Fields</title>
1123    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
1124      <organization>Nine by Nine</organization>
1125      <address><email></email></address>
1126    </author>
1127    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
1128      <organization>BEA Systems</organization>
1129      <address><email></email></address>
1130    </author>
1131    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
1132      <organization>HP Labs</organization>
1133      <address><email></email></address>
1134    </author>
1135    <date year='2004' month='September' />
1136  </front>
1137  <seriesInfo name='BCP' value='90' />
1138  <seriesInfo name='RFC' value='3864' />
[196]1141<reference anchor="RFC4288">
1142  <front>
1143    <title>Media Type Specifications and Registration Procedures</title>
1144    <author initials="N." surname="Freed" fullname="N. Freed">
1145      <organization>Sun Microsystems</organization>
1146      <address>
1147        <email></email>
1148      </address>
1149    </author>
1150    <author initials="J." surname="Klensin" fullname="J. Klensin">
1151      <address>
1152        <email></email>
1153      </address>
1154    </author>
1155    <date year="2005" month="December"/>
1156  </front>
1157  <seriesInfo name="BCP" value="13"/>
1158  <seriesInfo name="RFC" value="4288"/>
[930]1161<reference anchor='RFC5226'>
1162  <front>
1163    <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
1164    <author initials='T.' surname='Narten' fullname='T. Narten'>
1165      <organization>IBM</organization>
1166      <address><email></email></address>
1167    </author>
1168    <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
1169      <organization>Google</organization>
1170      <address><email></email></address>
1171    </author>
1172    <date year='2008' month='May' />
1173  </front>
1174  <seriesInfo name='BCP' value='26' />
1175  <seriesInfo name='RFC' value='5226' />
[8]1180<section title="Internet Media Type multipart/byteranges" anchor="">
1181<iref item="Media Type" subitem="multipart/byteranges" primary="true"/>
1182<iref item="multipart/byteranges Media Type" primary="true"/>
[1708]1184   When an HTTP <x:ref>206 (Partial Content)</x:ref> response message includes the
[8]1185   content of multiple ranges (a response to a request for multiple
1186   non-overlapping ranges), these are transmitted as a multipart
[1544]1187   message body (<xref target="RFC2046" x:fmt="," x:sec="5.1"/>). The media type for this purpose is called
[196]1188   "multipart/byteranges".  The following is to be registered with IANA <xref target="RFC4288"/>.
[332]1191   The multipart/byteranges media type includes one or more parts, each
[1740]1192   with its own <x:ref>Content-Type</x:ref> and <x:ref>Content-Range</x:ref>
1193   fields. The required boundary parameter specifies the boundary string used
1194   to separate each body-part.
1197  <list style="hanging" x:indent="12em">
[196]1198    <t hangText="Type name:">
[8]1199      multipart
1200    </t>
[196]1201    <t hangText="Subtype name:">
[8]1202      byteranges
1203    </t>
1204    <t hangText="Required parameters:">
1205      boundary
1206    </t>
1207    <t hangText="Optional parameters:">
1208      none
1209    </t>
1210    <t hangText="Encoding considerations:">
1211      only "7bit", "8bit", or "binary" are permitted
1212    </t>
1213    <t hangText="Security considerations:">
1214      none
1215    </t>
[196]1216    <t hangText="Interoperability considerations:">
1217      none
1218    </t>
1219    <t hangText="Published specification:">
1220      This specification (see <xref target=""/>).
1221    </t>
1222    <t hangText="Applications that use this media type:">
[1749]1223      HTTP components supporting multiple ranges in a single request.
[196]1224    </t>
1225    <t hangText="Additional information:">
1226      <list style="hanging">
1227        <t hangText="Magic number(s):">none</t>
1228        <t hangText="File extension(s):">none</t>
1229        <t hangText="Macintosh file type code(s):">none</t>
1230      </list>
1231    </t>
1232    <t hangText="Person and email address to contact for further information:">
1233      See Authors Section.
1234    </t>
[609]1235    <t hangText="Intended usage:">
1236      COMMON
[196]1237    </t>
[609]1238    <t hangText="Restrictions on usage:">
1239      none
[196]1240    </t>
1241    <t hangText="Author/Change controller:">
1242      IESG
1243    </t>
[8]1244  </list>
1247  <t>
1248    &Note; Despite the name "multipart/byteranges" is not limited to the byte ranges only.
1249  </t>
1252   For example:
1253</preamble><artwork type="example">
[435]1254  HTTP/1.1 206 Partial Content
1255  Date: Wed, 15 Nov 1995 06:25:24 GMT
1256  Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
1257  Content-type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
1260  Content-type: application/pdf
1261  Content-range: bytes 500-999/8000
1263  ...the first range...
1265  Content-type: application/pdf
1266  Content-range: bytes 7000-7999/8000
1268  ...the second range
[1749]1272   Another example, using the "exampleunit" range unit:
1274<artwork type="example">
1275  HTTP/1.1 206 Partial Content
1276  Date: Tue, 14 Nov 1995 06:25:24 GMT
1277  Last-Modified: Tue, 14 July 04:58:08 GMT
1278  Content-type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
1281  Content-type: video/example
1282  Content-range: exampleunit 1.2-4.3/25
1284  ...the first range...
[645]1286  Content-type: video/example
1287  Content-range: exampleunit 11.2-14.3/25
1289  ...the second range
[1749]1294  Notes:
[8]1295  <list style="numbers">
[908]1296      <t>Additional CRLFs &MAY; precede the first boundary string in the body.</t>
[97]1298      <t>Although <xref target="RFC2046"/> permits the boundary string to be
[8]1299         quoted, some existing implementations handle a quoted boundary
1300         string incorrectly.</t>
[1600]1302      <t>A number of clients and servers were coded to an early draft
[8]1303         of the byteranges specification to use a media type of
1304         multipart/x-byteranges<iref item="multipart/x-byteranges Media Type"/><iref item="Media Type" subitem="multipart/x-byteranges"/>, which is almost, but not quite
1305         compatible with the version documented in HTTP/1.1.</t>
1306  </list>
[99]1310<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
[1760]1312  Introduce Range Specifier Registry.
1313  (<xref target="range.specifier.registry"/>)
[1732]1316  Clarify that it is not ok to use a weak validator in a <x:ref>206</x:ref> response.
[105]1317  (<xref target="status.206"/>)
1320  Clarify that multipart/byteranges can consist of a single part.
1321  (<xref target=""/>)
[1805]1325<section title="Imported ABNF" anchor="imported.abnf">
1326  <x:anchor-alias value="ALPHA"/>
1327  <x:anchor-alias value="CHAR"/>
1328  <x:anchor-alias value="CR"/>
1329  <x:anchor-alias value="DIGIT"/>
1330  <x:anchor-alias value="LF"/>
1331  <x:anchor-alias value="OCTET"/>
1332  <x:anchor-alias value="SP"/>
1333  <x:anchor-alias value="VCHAR"/>
1334  <x:anchor-alias value="token"/>
1335  <x:anchor-alias value="OWS"/>
1336  <x:anchor-alias value="HTTP-date"/>
1337  <x:anchor-alias value="entity-tag"/>
1339  The following core rules are included by
[1806]1340  reference, as defined in <xref target="RFC5234" x:fmt="of" x:sec="B.1"/>:
[1805]1341  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
1342  DIGIT (decimal 0-9), DQUOTE (double quote),
1343  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
1344  OCTET (any 8-bit sequence of data), SP (space), and
1345  VCHAR (any visible US-ASCII character).
1348  Note that all rules derived from <x:ref>token</x:ref> are to
1349  be compared case-insensitively, like <x:ref>range-unit</x:ref> and
1350  <x:ref>acceptable-ranges</x:ref>.
1353  The rules below are defined in <xref target="Part1"/>:
1355<figure><artwork type="abnf2616">
1356  <x:ref>OWS</x:ref>        = &lt;OWS, defined in &whitespace;&gt;
1357  <x:ref>token</x:ref>      = &lt;token, defined in &field-components;&gt;
1360  The rules below are defined in other parts:
1362<figure><artwork type="abnf2616">
1363  <x:ref>HTTP-date</x:ref>  = &lt;HTTP-date, defined in &http-date;&gt;
1364  <x:ref>entity-tag</x:ref> = &lt;entity-tag, defined in &entity-tags;&gt;
[680]1368<?BEGININC p5-range.abnf-appendix ?>
[427]1369<section xmlns:x="" title="Collected ABNF" anchor="collected.abnf">
1371<artwork type="abnf" name="p5-range.parsed-abnf">
[1232]1372<x:ref>Accept-Ranges</x:ref> = acceptable-ranges
[1398]1374<x:ref>Content-Range</x:ref> = byte-content-range-spec / other-content-range-spec
[1906]1376<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part2], Section 8.1&gt;
[1232]1378<x:ref>If-Range</x:ref> = entity-tag / HTTP-date
[1523]1380<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 3.2.1&gt;
[1232]1382<x:ref>Range</x:ref> = byte-ranges-specifier / other-ranges-specifier
1384<x:ref>acceptable-ranges</x:ref> = ( *( "," OWS ) range-unit *( OWS "," [ OWS
[425]1385 range-unit ] ) ) / "none"
[427]1387<x:ref>byte-content-range-spec</x:ref> = bytes-unit SP byte-range-resp-spec "/" (
[425]1388 instance-length / "*" )
[427]1389<x:ref>byte-range-resp-spec</x:ref> = ( first-byte-pos "-" last-byte-pos ) / "*"
[1663]1390<x:ref>byte-range-set</x:ref> = *( "," OWS ) ( byte-range-spec /
1391 suffix-byte-range-spec ) *( OWS "," [ OWS ( byte-range-spec /
1392 suffix-byte-range-spec ) ] )
[427]1393<x:ref>byte-range-spec</x:ref> = first-byte-pos "-" [ last-byte-pos ]
1394<x:ref>byte-ranges-specifier</x:ref> = bytes-unit "=" byte-range-set
1395<x:ref>bytes-unit</x:ref> = "bytes"
[1383]1397<x:ref>entity-tag</x:ref> = &lt;entity-tag, defined in [Part4], Section 2.3&gt;
1399<x:ref>first-byte-pos</x:ref> = 1*DIGIT
1401<x:ref>instance-length</x:ref> = 1*DIGIT
1403<x:ref>last-byte-pos</x:ref> = 1*DIGIT
1405<x:ref>other-content-range-spec</x:ref> = other-range-unit SP other-range-resp-spec
1406<x:ref>other-range-resp-spec</x:ref> = *CHAR
[638]1407<x:ref>other-range-set</x:ref> = 1*CHAR
[427]1408<x:ref>other-range-unit</x:ref> = token
[638]1409<x:ref>other-ranges-specifier</x:ref> = other-range-unit "=" other-range-set
1411<x:ref>range-unit</x:ref> = bytes-unit / other-range-unit
1413<x:ref>suffix-byte-range-spec</x:ref> = "-" suffix-length
1414<x:ref>suffix-length</x:ref> = 1*DIGIT
[1523]1416<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 3.2.4&gt;
[680]1420<?ENDINC p5-range.abnf-appendix ?>
[252]1423<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
[1804]1425  Changes up to the first Working Group Last Call draft are summarized
1426  in <eref target=""/>.
[1592]1429<section title="Since draft-ietf-httpbis-p5-range-19" anchor="changes.since.19">
[1663]1431  Closed issues:
1432  <list style="symbols"> 
1433    <t>
1434      <eref target=""/>:
1435      "ABNF list expansion code problem"
1436    </t>
[1682]1437    <t>
1438      <eref target=""/>:
1439      "ABNF requirements for recipients"
1440    </t>
[1748]1441    <t>
1442      <eref target=""/>:
1443      "reserve 'none' as byte range unit"
1444    </t>
[1760]1445    <t>
1446      <eref target=""/>:
1447      "note introduction of new IANA registries as normative changes"
1448    </t>
[1767]1449    <t>
1450      <eref target=""/>:
1451      "range units vs leading zeroes vs size"
1452    </t>
[1663]1453  </list>
[1807]1457<section title="Since draft-ietf-httpbis-p5-range-20" anchor="changes.since.20">
[1889]1459  <list style="symbols">
1460    <t>
1461      Conformance criteria and considerations regarding error handling are
1462      now defined in Part 1.
1463    </t>
1464  </list>
Note: See TracBrowser for help on using the repository browser.