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

Last change on this file since 1526 was 1524, checked in by julian.reschke@…, 8 years ago

remove unneeded status code descriptions (resolves #336)

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 72.4 KB
RevLine 
[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='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>">
[29]14  <!ENTITY ID-VERSION "latest">
[1522]15  <!ENTITY ID-MONTH "February">
[1497]16  <!ENTITY ID-YEAR "2012">
[1452]17  <!ENTITY architecture               "<xref target='Part1' x:rel='#architecture' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[424]18  <!ENTITY notation                   "<xref target='Part1' x:rel='#notation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[1518]19  <!ENTITY abnf-extension             "<xref target='Part1' x:rel='#abnf.extension' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[1364]20  <!ENTITY acks                       "<xref target='Part1' x:rel='#acks' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[1518]21  <!ENTITY whitespace                 "<xref target='Part1' x:rel='#whitespace' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
22  <!ENTITY field-components           "<xref target='Part1' x:rel='#field.components' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[1436]23  <!ENTITY http-date                  "<xref target='Part2' x:rel='#http.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[31]24  <!ENTITY messaging                  "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[1260]25  <!ENTITY entity-tags                "<xref target='Part4' x:rel='#header.etag' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[31]26  <!ENTITY weak-and-strong-validators "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[1260]27  <!ENTITY lastmod-comparison         "<xref target='Part4' x:rel='#lastmod.comparison' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[1524]28  <!ENTITY p6-heuristic               "<xref target='Part6' x:rel='#heuristic.freshness' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
[8]29]>
30<?rfc toc="yes" ?>
[29]31<?rfc symrefs="yes" ?>
32<?rfc sortrefs="yes" ?>
[8]33<?rfc compact="yes"?>
34<?rfc subcompact="no" ?>
35<?rfc linkmailto="no" ?>
36<?rfc editing="no" ?>
[203]37<?rfc comments="yes"?>
38<?rfc inline="yes"?>
[799]39<?rfc rfcedstyle="yes"?>
[8]40<?rfc-ext allow-markup-in-artwork="yes" ?>
41<?rfc-ext include-references-in-index="yes" ?>
[1477]42<rfc obsoletes="2616" category="std" x:maturity-level="proposed"
43     ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p5-range-&ID-VERSION;"
44     xmlns:x='http://purl.org/net/xml2rfc/ext'>
[1472]45<x:link rel="prev" basename="p4-conditional"/>
46<x:link rel="next" basename="p6-cache"/>
[1522]47<x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>
[8]48<front>
49
[120]50  <title abbrev="HTTP/1.1, Part 5">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
[8]51
[29]52  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]53    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[8]54    <address>
55      <postal>
[1106]56        <street>345 Park Ave</street>
57        <city>San Jose</city>
[8]58        <region>CA</region>
[1106]59        <code>95110</code>
[29]60        <country>USA</country>
[8]61      </postal>
[29]62      <email>fielding@gbiv.com</email>
63      <uri>http://roy.gbiv.com/</uri>
[8]64    </address>
65  </author>
66
[29]67  <author initials="J." surname="Gettys" fullname="Jim Gettys">
[844]68    <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
[8]69    <address>
70      <postal>
[29]71        <street>21 Oak Knoll Road</street>
72        <city>Carlisle</city>
[8]73        <region>MA</region>
[29]74        <code>01741</code>
75        <country>USA</country>
[8]76      </postal>
[844]77      <email>jg@freedesktop.org</email>
78      <uri>http://gettys.wordpress.com/</uri>
[8]79    </address>
80  </author>
81 
82  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
[29]83    <organization abbrev="HP">Hewlett-Packard Company</organization>
[8]84    <address>
85      <postal>
[29]86        <street>HP Labs, Large Scale Systems Group</street>
87        <street>1501 Page Mill Road, MS 1177</street>
[8]88        <city>Palo Alto</city>
89        <region>CA</region>
[29]90        <code>94304</code>
91        <country>USA</country>
[8]92      </postal>
[29]93      <email>JeffMogul@acm.org</email>
[8]94    </address>
95  </author>
96
97  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
[29]98    <organization abbrev="Microsoft">Microsoft Corporation</organization>
[8]99    <address>
100      <postal>
[29]101        <street>1 Microsoft Way</street>
102        <city>Redmond</city>
103        <region>WA</region>
104        <code>98052</code>
105        <country>USA</country>
[8]106      </postal>
[29]107      <email>henrikn@microsoft.com</email>
[8]108    </address>
109  </author>
110
111  <author initials="L." surname="Masinter" fullname="Larry Masinter">
[1106]112    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[8]113    <address>
114      <postal>
[29]115        <street>345 Park Ave</street>
116        <city>San Jose</city>
[8]117        <region>CA</region>
[29]118        <code>95110</code>
119        <country>USA</country>
[8]120      </postal>
[29]121      <email>LMM@acm.org</email>
122      <uri>http://larry.masinter.net/</uri>
[8]123    </address>
124  </author>
125 
126  <author initials="P." surname="Leach" fullname="Paul J. Leach">
127    <organization abbrev="Microsoft">Microsoft Corporation</organization>
128    <address>
129      <postal>
130        <street>1 Microsoft Way</street>
131        <city>Redmond</city>
132        <region>WA</region>
133        <code>98052</code>
134      </postal>
135      <email>paulle@microsoft.com</email>
136    </address>
137  </author>
138   
139  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
140    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
141    <address>
142      <postal>
[34]143        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
144        <street>The Stata Center, Building 32</street>
145        <street>32 Vassar Street</street>
[8]146        <city>Cambridge</city>
147        <region>MA</region>
148        <code>02139</code>
[29]149        <country>USA</country>
[8]150      </postal>
151      <email>timbl@w3.org</email>
[34]152      <uri>http://www.w3.org/People/Berners-Lee/</uri>
[8]153    </address>
154  </author>
155
[95]156  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
[94]157    <organization abbrev="W3C">World Wide Web Consortium</organization>
158    <address>
159      <postal>
160        <street>W3C / ERCIM</street>
161        <street>2004, rte des Lucioles</street>
162        <city>Sophia-Antipolis</city>
163        <region>AM</region>
164        <code>06902</code>
165        <country>France</country>
166      </postal>
167      <email>ylafon@w3.org</email>
168      <uri>http://www.raubacapeu.net/people/yves/</uri>
169    </address>
170  </author>
171
[95]172  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
173    <organization abbrev="greenbytes">greenbytes GmbH</organization>
174    <address>
175      <postal>
176        <street>Hafenweg 16</street>
177        <city>Muenster</city><region>NW</region><code>48155</code>
178        <country>Germany</country>
179      </postal>
[609]180      <phone>+49 251 2807760</phone>
181      <facsimile>+49 251 2807761</facsimile>
182      <email>julian.reschke@greenbytes.de</email>
183      <uri>http://greenbytes.de/tech/webdav/</uri>
[95]184    </address>
185  </author>
186
[31]187  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
[440]188  <workgroup>HTTPbis Working Group</workgroup>
[8]189
190<abstract>
191<t>
[1373]192   The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
193   distributed, collaborative, hypertext information systems. HTTP has been in
194   use by the World Wide Web global information initiative since 1990. This
195   document is Part 5 of the seven-part specification that defines the protocol
196   referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616.
[8]197</t>
[1373]198<t>
199   Part 5 defines range-specific requests and the rules for constructing and
200   combining responses to those requests.
201</t>
[8]202</abstract>
[36]203
204<note title="Editorial Note (To be removed by RFC Editor)">
205  <t>
206    Discussion of this draft should take place on the HTTPBIS working group
[1268]207    mailing list (ietf-http-wg@w3.org), which is archived at
208    <eref target="http://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
209  </t>
210  <t>
211    The current issues list is at
212    <eref target="http://tools.ietf.org/wg/httpbis/trac/report/3"/> and related
213    documents (including fancy diffs) can be found at
[324]214    <eref target="http://tools.ietf.org/wg/httpbis/"/>.
[36]215  </t>
[153]216  <t>
[1499]217    The changes in this draft are summarized in <xref target="changes.since.18"/>.
[153]218  </t>
[36]219</note>
[8]220</front>
221<middle>
222<section title="Introduction" anchor="introduction">
223<t>
[158]224   HTTP clients often encounter interrupted data transfers as a result
[1374]225   of cancelled requests or dropped connections.  When a client has stored
[158]226   a partial representation, it is desirable to request the remainder
227   of that representation in a subsequent request rather than transfer
228   the entire representation.
229   There are also a number of Web applications that benefit from being
230   able to request only a subset of a larger representation, such as a
231   single page of a very large document or only part of an image to be
232   rendered by a device with limited local storage.
[8]233</t>
[158]234<t>
[163]235   This document defines HTTP/1.1 range requests,
[158]236   partial responses, and the multipart/byteranges media type.
[163]237   The protocol for range requests is an &OPTIONAL; feature of HTTP,
[158]238   designed so resources or recipients that do not implement this feature
239   can respond as if it is a normal GET request without impacting
240   interoperability.  Partial responses are indicated by a distinct status
241   code to not be mistaken for full responses by intermediate caches
242   that might not implement the feature.
243</t>
244<t>
[163]245   Although the HTTP range request mechanism is designed to allow for
[158]246   extensible range types, this specification only defines requests for
247   byte ranges.
248</t>
[96]249
[1452]250<section title="Conformance and Error Handling" anchor="intro.conformance.and.error.handling">
[96]251<t>
252   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
253   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
254   document are to be interpreted as described in <xref target="RFC2119"/>.
255</t>
256<t>
[1452]257   This document defines conformance criteria for several roles in HTTP
258   communication, including Senders, Recipients, Clients, Servers, User-Agents,
259   Origin Servers, Intermediaries, Proxies and Gateways. See &architecture;
260   for definitions of these terms.
[96]261</t>
[1452]262<t>
263   An implementation is considered conformant if it complies with all of the
264   requirements associated with its role(s). Note that SHOULD-level requirements
265   are relevant here, unless one of the documented exceptions is applicable.
266</t>
267<t>
268   This document also uses ABNF to define valid protocol elements
269   (<xref target="notation"/>). In addition to the prose requirements placed
270   upon them, Senders &MUST-NOT; generate protocol elements that are invalid.
271</t>
272<t>
273   Unless noted otherwise, Recipients &MAY; take steps to recover a usable
274   protocol element from an invalid construct. However, HTTP does not define
275   specific error handling mechanisms, except in cases where it has direct
276   impact on security. This is because different uses of the protocol require
277   different error handling strategies; for example, a Web browser may wish to
278   transparently recover from a response where the Location header field
279   doesn't parse according to the ABNF, whereby in a systems control protocol
280   using HTTP, this type of error recovery could lead to dangerous consequences.
281</t>
[8]282</section>
283
[424]284<section title="Syntax Notation" anchor="notation">
[425]285  <x:anchor-alias value="ALPHA"/>
286  <x:anchor-alias value="CHAR"/>
287  <x:anchor-alias value="CR"/>
288  <x:anchor-alias value="DIGIT"/>
289  <x:anchor-alias value="LF"/>
290  <x:anchor-alias value="OCTET"/>
291  <x:anchor-alias value="SP"/>
292  <x:anchor-alias value="VCHAR"/>
[424]293<t>
[1518]294   This specification uses the Augmented Backus-Naur Form (ABNF) notation
295   of <xref target="RFC5234"/> with the list rule extension defined in
296   &notation;<xref target="collected.abnf"/> shows the collected ABNF
297   with the list rule expanded.
[543]298</t>
299<t>
[425]300  The following core rules are included by
301  reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
302  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
303  DIGIT (decimal 0-9), DQUOTE (double quote),
304  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
[1425]305  OCTET (any 8-bit sequence of data), SP (space), and
306  VCHAR (any visible US-ASCII character).
[424]307</t>
308
[1456]309<t>
310  Note that all rules derived from <x:ref>token</x:ref> are to
311  be compared case-insensitively, like <x:ref>range-unit</x:ref> and
312  <x:ref>acceptable-ranges</x:ref>.
313</t>
314
[424]315<section title="Core Rules" anchor="core.rules">
[229]316  <x:anchor-alias value="token"/>
[363]317  <x:anchor-alias value="OWS"/>
[1397]318  <x:anchor-alias value="HTTP-date"/>
[205]319<t>
[1436]320  The core rules below are defined in <xref target="Part1"/> and
321  <xref target="Part2"/>:
[205]322</t>
323<figure><artwork type="abnf2616">
[1518]324  <x:ref>OWS</x:ref>        = &lt;OWS, defined in &whitespace;&gt;
325  <x:ref>token</x:ref>      = &lt;token, defined in &field-components;&gt;
[1436]326  <x:ref>HTTP-date</x:ref>  = &lt;HTTP-date, defined in &http-date;&gt;
[205]327</artwork></figure>
[424]328</section>
329
330<section title="ABNF Rules defined in other Parts of the Specification" anchor="abnf.dependencies">
[229]331  <x:anchor-alias value="entity-tag"/>
[424]332<t>
[205]333  The ABNF rules below are defined in other parts:
334</t>
[207]335<figure><!--Part4--><artwork type="abnf2616">
[229]336  <x:ref>entity-tag</x:ref> = &lt;entity-tag, defined in &entity-tags;&gt;
[205]337</artwork></figure>
338</section>
339
[424]340</section>
341
342</section>
343
344
[8]345<section title="Range Units" anchor="range.units">
[229]346  <x:anchor-alias value="bytes-unit"/>
347  <x:anchor-alias value="other-range-unit"/>
348  <x:anchor-alias value="range-unit"/>
[8]349<t>
[1260]350   HTTP/1.1 allows a client to request that only part (a range) of the
[874]351   representation be included within the response. HTTP/1.1 uses range
[8]352   units in the Range (<xref target="header.range"/>) and Content-Range (<xref target="header.content-range"/>)
[874]353   header fields. A representation can be broken down into subranges according
[8]354   to various structural units.
355</t>
356<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]357  <x:ref>range-unit</x:ref>       = <x:ref>bytes-unit</x:ref> / <x:ref>other-range-unit</x:ref>
[229]358  <x:ref>bytes-unit</x:ref>       = "bytes"
359  <x:ref>other-range-unit</x:ref> = <x:ref>token</x:ref>
[8]360</artwork></figure>
361<t>
[393]362  HTTP/1.1 has been designed to allow implementations of applications
363  that do not depend on knowledge of ranges. The only range unit defined
[930]364  by HTTP/1.1 is "bytes". Additional specifiers can be defined as described
365  in <xref target="range.specifier.registry"/>.
[8]366</t>
367<t>
[393]368  If a range unit is not understood in a request, a server &MUST; ignore
[994]369  the whole Range header field (<xref target="header.range"/>).
[393]370  If a range unit is not understood in a response, an intermediary
371  &SHOULD; pass the response to the client; a client &MUST; fail.
[8]372</t>
[930]373
374<section title="Range Specifier Registry" anchor="range.specifier.registry">
375<t>
[1260]376   The HTTP Range Specifier Registry defines the name space for the range
[930]377   specifier names.
378</t>
379<t>
380   Registrations &MUST; include the following fields:
381   <list style="symbols">
382     <t>Name</t>
383     <t>Description</t>
384     <t>Pointer to specification text</t>
385   </list>
386</t>
387<t>
388  Values to be added to this name space are subject to IETF review
389  (<xref target="RFC5226" x:fmt="," x:sec="4.1"/>).
390</t>
391<t>
392   The registry itself is maintained at
393   <eref target="http://www.iana.org/assignments/http-range-specifiers"/>.
394</t>
[8]395</section>
396
[930]397</section>
398
[838]399<section title="Status Code Definitions" anchor="status.code.definitions">
[8]400<section title="206 Partial Content" anchor="status.206">
401  <iref primary="true" item="206 Partial Content (status code)" x:for-anchor=""/>
402  <iref primary="true" item="Status Codes" subitem="206 Partial Content" x:for-anchor=""/>
403<t>
404   The server has fulfilled the partial GET request for the resource.
405   The request &MUST; have included a Range header field (<xref target="header.range"/>)
406   indicating the desired range, and &MAY; have included an If-Range
407   header field (<xref target="header.if-range"/>) to make the request conditional.
408</t>
409<t>
410   The response &MUST; include the following header fields:
411  <list style="symbols">
412    <t>
413        Either a Content-Range header field (<xref target="header.content-range"/>) indicating
414        the range included with this response, or a multipart/byteranges
415        Content-Type including Content-Range fields for each part. If a
416        Content-Length header field is present in the response, its
[852]417        value &MUST; match the actual number of octets transmitted in the
[8]418        message-body.
419    </t>
420    <t>
421        Date
422    </t>
423    <t>
[860]424        Cache-Control, ETag, Expires, Content-Location, Last-Modified,
425        and/or Vary, if the header field would have been sent in a 200
426        response to the same request
[8]427    </t>
428  </list>
429</t>
430<t>
[79]431   If the 206 response is the result of an If-Range request, the response
[965]432   &SHOULD-NOT; include other representation header fields. Otherwise, the response
433   &MUST; include all of the representation header fields that would have been returned
[8]434   with a 200 (OK) response to the same request.
435</t>
[1524]436<t>
437   Caches &MAY; use a heuristic (see &p6-heuristic;) to determine
438   freshness for 206 responses.
439</t>
[8]440</section>
441
442<section title="416 Requested Range Not Satisfiable" anchor="status.416">
443  <iref primary="true" item="416 Requested Range Not Satisfiable (status code)" x:for-anchor=""/>
444  <iref primary="true" item="Status Codes" subitem="416 Requested Range Not Satisfiable" x:for-anchor=""/>
445<t>
446   A server &SHOULD; return a response with this status code if a request
[1163]447   included a Range header field (<xref target="header.range"/>), and none of
[359]448   the ranges-specifier values in this field overlap the current extent
[8]449   of the selected resource, and the request did not include an If-Range
[1163]450   header field (<xref target="header.if-range"/>). (For byte-ranges,
[829]451   this means that the first-byte-pos of all of the byte-range-spec values were
452   greater than the current length of the selected resource.)
[8]453</t>
454<t>
455   When this status code is returned for a byte-range request, the
[965]456   response &SHOULD; include a Content-Range header field
457   specifying the current length of the representation (see <xref target="header.content-range"/>).
[8]458   This response &MUST-NOT; use the multipart/byteranges content-type.
459</t>
460</section>
[39]461</section>
[8]462
[393]463<section title="Combining Ranges" anchor="combining.byte.ranges">
[8]464<t>
[1374]465   A response might transfer only a subrange of a representation if the
466   connection closed prematurely or if the request used one or more Range
467   specifications.  After several such transfers, a client might have
468   received several ranges of the same representation.  These ranges can only
469   be safely combined if they all have in common the same strong validator,
470   where "strong validator" is defined to be either an entity-tag that is
471   not marked as weak (&entity-tags;) or, if no entity-tag is provided, a
472   Last-Modified value that is strong in the sense defined by
473   &lastmod-comparison;.
[8]474</t>
475<t>
[1374]476   When a client receives an incomplete 200 (OK) or 206 (Partial Content)
477   response and already has one or more stored responses for the same method
478   and effective request URI, all of the stored responses with the same
479   strong validator &MAY; be combined with the partial content in this new
480   response.  If none of the stored responses contain the same strong
481   validator, then this new response corresponds to a new representation
482   and &MUST-NOT; be combined with the existing stored responses.
[8]483</t>
484<t>
[1374]485   If the new response is an incomplete 200 (OK) response, then the header
486   fields of that new response are used for any combined response and replace
487   those of the matching stored responses.
[8]488</t>
[1374]489<t>
490   If the new response is a 206 (Partial Content) response and at least one
491   of the matching stored responses is a 200 (OK), then the combined response
492   header fields consist of the most recent 200 response's header fields.
493   If all of the matching stored responses are 206 responses, then the
494   stored response with the most header fields is used as the source of
495   header fields for the combined response, except that the client &MUST;
496   use other header fields provided in the new response, aside from
497   Content-Range, to replace all instances of the corresponding header
498   fields in the stored response.
499</t>
500<t>
501   The combined response message-body consists of the union of partial
502   content ranges in the new response and each of the selected responses.
503   If the union consists of the entire range of the representation, then the
504   combined response &MUST; be recorded as a complete 200 (OK) response
505   with a Content-Length header field that reflects the complete length.
506   Otherwise, the combined response(s) &MUST; include a Content-Range
507   header field describing the included range(s) and be recorded as
508   incomplete.  If the union consists of a discontinuous range of the
509   representation, then the client &MAY; store it as either a multipart range
510   response or as multiple 206 responses with one continuous range each.
511</t>
[8]512</section>
513
[1415]514<section title="Header Field Definitions" anchor="header.field.definitions">
[8]515<t>
[117]516   This section defines the syntax and semantics of HTTP/1.1 header fields
517   related to range requests and partial responses.
[8]518</t>
[117]519
[8]520<section title="Accept-Ranges" anchor="header.accept-ranges">
[1120]521  <iref primary="true" item="Accept-Ranges header field" x:for-anchor=""/>
522  <iref primary="true" item="Header Fields" subitem="Accept-Ranges" x:for-anchor=""/>
[229]523  <x:anchor-alias value="Accept-Ranges"/>
524  <x:anchor-alias value="acceptable-ranges"/>
[8]525<t>
[1163]526   The "Accept-Ranges" header field allows a resource to indicate
[698]527   its acceptance of range requests.
[8]528</t>
[1232]529<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Ranges"/><iref primary="true" item="Grammar" subitem="acceptable-ranges"/>
530  <x:ref>Accept-Ranges</x:ref>     = <x:ref>acceptable-ranges</x:ref>
[334]531  <x:ref>acceptable-ranges</x:ref> = 1#<x:ref>range-unit</x:ref> / "none"
[8]532</artwork></figure>
533<t>
534      Origin servers that accept byte-range requests &MAY; send
535</t>
536<figure><artwork type="example">
[363]537  Accept-Ranges: bytes
[8]538</artwork></figure>
539<t>
[393]540      but are not required to do so. Clients &MAY; generate range
[994]541      requests without having received this header field for the resource
[8]542      involved. Range units are defined in <xref target="range.units"/>.
543</t>
544<t>
545      Servers that do not accept any kind of range request for a
546      resource &MAY; send
547</t>
548<figure><artwork type="example">
[363]549  Accept-Ranges: none
[8]550</artwork></figure>
551<t>
552      to advise the client not to attempt a range request.
553</t>
554</section>
555
556<section title="Content-Range" anchor="header.content-range">
[1120]557  <iref primary="true" item="Content-Range header field" x:for-anchor=""/>
558  <iref primary="true" item="Header Fields" subitem="Content-Range" x:for-anchor=""/>
[229]559  <x:anchor-alias value="byte-content-range-spec"/>
560  <x:anchor-alias value="byte-range-resp-spec"/>
561  <x:anchor-alias value="Content-Range"/>
562  <x:anchor-alias value="instance-length"/>
[393]563  <x:anchor-alias value="other-content-range-spec"/>
564  <x:anchor-alias value="other-range-resp-spec"/>
[8]565<t>
[965]566   The "Content-Range" header field is sent with a partial representation to
[969]567   specify where in the full representation the payload body is intended to be
[962]568   applied.
[8]569</t>
[962]570<t>   
571   Range units are defined in <xref target="range.units"/>.
572</t>
[1398]573<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"/>
574  <x:ref>Content-Range</x:ref>           = <x:ref>byte-content-range-spec</x:ref>
[434]575                          / <x:ref>other-content-range-spec</x:ref>
[1398]576                         
[229]577  <x:ref>byte-content-range-spec</x:ref> = <x:ref>bytes-unit</x:ref> <x:ref>SP</x:ref>
578                            <x:ref>byte-range-resp-spec</x:ref> "/"
[334]579                            ( <x:ref>instance-length</x:ref> / "*" )
[135]580 
[304]581  <x:ref>byte-range-resp-spec</x:ref>    = (<x:ref>first-byte-pos</x:ref> "-" <x:ref>last-byte-pos</x:ref>)
[334]582                          / "*"
[304]583                         
584  <x:ref>instance-length</x:ref>         = 1*<x:ref>DIGIT</x:ref>
[393]585 
586  <x:ref>other-content-range-spec</x:ref> = <x:ref>other-range-unit</x:ref> <x:ref>SP</x:ref>
587                             <x:ref>other-range-resp-spec</x:ref>
588  <x:ref>other-range-resp-spec</x:ref>    = *<x:ref>CHAR</x:ref>
[8]589</artwork></figure>
590<t>
[994]591   The header field &SHOULD; indicate the total length of the full representation,
[8]592   unless this length is unknown or difficult to determine. The asterisk
593   "*" character means that the instance-length is unknown at the time
594   when the response was generated.
595</t>
596<t>
597   Unlike byte-ranges-specifier values (see <xref target="byte.ranges"/>), a byte-range-resp-spec
598   &MUST; only specify one range, and &MUST; contain
599   absolute byte positions for both the first and last byte of the
600   range.
601</t>
602<t>
603   A byte-content-range-spec with a byte-range-resp-spec whose last-byte-pos
604   value is less than its first-byte-pos value, or whose
605   instance-length value is less than or equal to its last-byte-pos
606   value, is invalid. The recipient of an invalid byte-content-range-spec
607   &MUST; ignore it and any content transferred along with it.
608</t>
609<t>
[393]610   In the case of a byte range request:
[8]611   A server sending a response with status code 416 (Requested range not
612   satisfiable) &SHOULD; include a Content-Range field with a byte-range-resp-spec
613   of "*". The instance-length specifies the current length of
[576]614   the selected resource. A response with status code 206 (Partial
[8]615   Content) &MUST-NOT; include a Content-Range field with a byte-range-resp-spec of "*".
616</t>
617<t>
[1461]618  The "Content-Range" header field has no meaning for status codes that do not
[1459]619  explicitly describe its semantic. Currently, only status codes
620  206 (Partial Content) and 416 (Requested range not satisfiable) describe
621  the meaning of this header field.
622</t>
623<t>
[866]624   Examples of byte-content-range-spec values, assuming that the representation
[8]625   contains a total of 1234 bytes:
626   <list style="symbols">
627      <t>
628        The first 500 bytes:
[565]629<figure><artwork type="example" x:indent-with="   ">
630  bytes 0-499/1234
[8]631</artwork></figure>
632      </t>   
633      <t>
634        The second 500 bytes:
[565]635<figure><artwork type="example" x:indent-with="   ">
636  bytes 500-999/1234
[8]637</artwork></figure>
638      </t>   
639      <t>
640        All except for the first 500 bytes:
[565]641<figure><artwork type="example" x:indent-with="   ">
642  bytes 500-1233/1234
[8]643</artwork></figure>
644      </t>   
645      <t>
646        The last 500 bytes:
[565]647<figure><artwork type="example" x:indent-with="   ">
648  bytes 734-1233/1234
[8]649</artwork></figure>
650      </t>   
651   </list>
652</t>
653<t>
654   When an HTTP message includes the content of a single range (for
655   example, a response to a request for a single range, or to a request
656   for a set of ranges that overlap without any holes), this content is
[994]657   transmitted with a Content-Range header field, and a Content-Length header
658   field showing the number of bytes actually transferred. For example,
[8]659</t>
660<figure><artwork type="example">
[363]661  HTTP/1.1 206 Partial Content
662  Date: Wed, 15 Nov 1995 06:25:24 GMT
663  Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
664  Content-Range: bytes 21010-47021/47022
665  Content-Length: 26012
666  Content-Type: image/gif
[8]667</artwork></figure>
668<t>
669   When an HTTP message includes the content of multiple ranges (for
670   example, a response to a request for multiple non-overlapping
671   ranges), these are transmitted as a multipart message. The multipart
672   media type used for this purpose is "multipart/byteranges" as defined
[911]673   in <xref target="internet.media.type.multipart.byteranges"/>.
[8]674</t>
675<t>
676   A response to a request for a single range &MUST-NOT; be sent using the
677   multipart/byteranges media type.  A response to a request for
678   multiple ranges, whose result is a single range, &MAY; be sent as a
679   multipart/byteranges media type with one part. A client that cannot
680   decode a multipart/byteranges message &MUST-NOT; ask for multiple
[393]681   ranges in a single request.
[8]682</t>
683<t>
[644]684   When a client requests multiple ranges in one request, the
[8]685   server &SHOULD; return them in the order that they appeared in the
686   request.
687</t>
688<t>
689   If the server ignores a byte-range-spec because it is syntactically
690   invalid, the server &SHOULD; treat the request as if the invalid Range
691   header field did not exist. (Normally, this means return a 200
[874]692   response containing the full representation).
[8]693</t>
694<t>
695   If the server receives a request (other than one including an If-Range
[1163]696   header field) with an unsatisfiable Range header
[8]697   field (that is, all of whose byte-range-spec values have a
698   first-byte-pos value greater than the current length of the selected
699   resource), it &SHOULD; return a response code of 416 (Requested range
700   not satisfiable) (<xref target="status.416"/>).
701</t>
[563]702<x:note>
703  <t>
[756]704    <x:h>Note:</x:h> Clients cannot depend on servers to send a 416 (Requested
[563]705    range not satisfiable) response instead of a 200 (OK) response for
[1163]706    an unsatisfiable Range header field, since not all servers
707    implement this header field.
[563]708  </t>
709</x:note>
[8]710</section>
711
712<section title="If-Range" anchor="header.if-range">
[1120]713  <iref primary="true" item="If-Range header field" x:for-anchor=""/>
714  <iref primary="true" item="Header Fields" subitem="If-Range" x:for-anchor=""/>
[229]715  <x:anchor-alias value="If-Range"/>
[8]716<t>
[1374]717   If a client has a partial copy of a representation and wishes
718   to have an up-to-date copy of the entire representation, it
[1163]719   could use the Range header field with a conditional GET (using
[8]720   either or both of If-Unmodified-Since and If-Match.) However, if the
[866]721   condition fails because the representation has been modified, the client
[8]722   would then have to make a second request to obtain the entire current
[866]723   representation.
[8]724</t>
725<t>
[1163]726   The "If-Range" header field allows a client to "short-circuit" the second
[866]727   request. Informally, its meaning is "if the representation is unchanged, send
[8]728   me the part(s) that I am missing; otherwise, send me the entire new
[866]729   representation".
[8]730</t>
[1232]731<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Range"/>
732  <x:ref>If-Range</x:ref> = <x:ref>entity-tag</x:ref> / <x:ref>HTTP-date</x:ref>
[8]733</artwork></figure>
734<t>
[1374]735   Clients &MUST-NOT; use an entity-tag marked as weak in an If-Range
736   field value and &MUST-NOT; use a Last-Modified date in an If-Range
737   field value unless it has no entity-tag for the representation and
738   the Last-Modified date it does have for the representation is strong
739   in the sense defined by &lastmod-comparison;.
[1260]740</t>
741<t>
[1374]742   A server that evaluates a conditional range request that is applicable
743   to one of its representations &MUST; evaluate the condition as false if
744   the entity-tag used as a validator is marked as weak or, when an HTTP-date
745   is used as the validator, if the date value is not strong in the sense
746   defined by &lastmod-comparison;. (A server can distinguish between a
747   valid HTTP-date and any form of entity-tag by examining the first
748   two characters.)
[8]749</t>
750<t>
[1374]751   The If-Range header field &SHOULD; only be sent by clients together with
752   a Range header field.  The If-Range header field &MUST; be ignored if it
753   is received in a request that does not include a Range header field.
754   The If-Range header field &MUST; be ignored by a server that does not
755   support the sub-range operation.
[1260]756</t>
757<t>
[1374]758   If the validator given in the If-Range header field matches the current
759   validator for the selected representation of the target resource, then
760   the server &SHOULD; send the specified sub-range of the representation
761   using a 206 (Partial Content) response. If the validator does not match,
762   then the server &SHOULD; send the entire representation using a 200 (OK)
763   response.
[8]764</t>
765</section>
766
767<section title="Range" anchor="header.range">
[1120]768  <iref primary="true" item="Range header field" x:for-anchor=""/>
769  <iref primary="true" item="Header Fields" subitem="Range" x:for-anchor=""/>
[8]770
771<section title="Byte Ranges" anchor="byte.ranges">
772<t>
[866]773   Since all HTTP representations are transferred as sequences
[8]774   of bytes, the concept of a byte range is meaningful for any HTTP
[866]775   representation. (However, not all clients and servers need to support byte-range
[8]776   operations.)
777</t>
778<t>
779   Byte range specifications in HTTP apply to the sequence of bytes in
[866]780   the representation body (not necessarily the same as the message-body).
[8]781</t>
[229]782<t anchor="rule.ranges-specifier">
783  <x:anchor-alias value="byte-range-set"/>
784  <x:anchor-alias value="byte-range-spec"/>
785  <x:anchor-alias value="byte-ranges-specifier"/>
786  <x:anchor-alias value="first-byte-pos"/>
787  <x:anchor-alias value="last-byte-pos"/>
788  <x:anchor-alias value="ranges-specifier"/>
789  <x:anchor-alias value="suffix-byte-range-spec"/>
790  <x:anchor-alias value="suffix-length"/>
[393]791
[8]792   A byte range operation &MAY; specify a single range of bytes, or a set
[866]793   of ranges within a single representation.
[8]794</t>
795<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]796  <x:ref>byte-ranges-specifier</x:ref> = <x:ref>bytes-unit</x:ref> "=" <x:ref>byte-range-set</x:ref>
[334]797  <x:ref>byte-range-set</x:ref>  = 1#( <x:ref>byte-range-spec</x:ref> / <x:ref>suffix-byte-range-spec</x:ref> )
[434]798  <x:ref>byte-range-spec</x:ref> = <x:ref>first-byte-pos</x:ref> "-" [ <x:ref>last-byte-pos</x:ref> ]
[229]799  <x:ref>first-byte-pos</x:ref>  = 1*<x:ref>DIGIT</x:ref>
800  <x:ref>last-byte-pos</x:ref>   = 1*<x:ref>DIGIT</x:ref>
[8]801</artwork></figure>
802<t>
803   The first-byte-pos value in a byte-range-spec gives the byte-offset
804   of the first byte in a range. The last-byte-pos value gives the
805   byte-offset of the last byte in the range; that is, the byte
[576]806   positions specified are inclusive. Byte offsets start at zero.
[8]807</t>
808<t>
809   If the last-byte-pos value is present, it &MUST; be greater than or
810   equal to the first-byte-pos in that byte-range-spec, or the byte-range-spec
811   is syntactically invalid. The recipient of a byte-range-set
812   that includes one or more syntactically invalid byte-range-spec
813   values &MUST; ignore the header field that includes that byte-range-set.
814</t>
815<t>
816   If the last-byte-pos value is absent, or if the value is greater than
[866]817   or equal to the current length of the representation body, last-byte-pos is
818   taken to be equal to one less than the current length of the representation
[8]819   in bytes.
820</t>
821<t>
822   By its choice of last-byte-pos, a client can limit the number of
[866]823   bytes retrieved without knowing the size of the representation.
[8]824</t>
825<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="suffix-byte-range-spec"/><iref primary="true" item="Grammar" subitem="suffix-length"/>
[229]826  <x:ref>suffix-byte-range-spec</x:ref> = "-" <x:ref>suffix-length</x:ref>
827  <x:ref>suffix-length</x:ref> = 1*<x:ref>DIGIT</x:ref>
[8]828</artwork></figure>
829<t>
830   A suffix-byte-range-spec is used to specify the suffix of the
[866]831   representation body, of a length given by the suffix-length value. (That is,
[874]832   this form specifies the last N bytes of a representation.) If the
[866]833   representation is shorter than the specified suffix-length, the entire
834   representation is used.
[8]835</t>
836<t>
837   If a syntactically valid byte-range-set includes at least one byte-range-spec
838   whose first-byte-pos is less than the current length of
[874]839   the representation, or at least one suffix-byte-range-spec with a non-zero
[8]840   suffix-length, then the byte-range-set is satisfiable.
841   Otherwise, the byte-range-set is unsatisfiable. If the byte-range-set
[926]842   is unsatisfiable, the server &SHOULD; return a response with a
843   416 (Requested range not satisfiable) status code. Otherwise, the server
844   &SHOULD; return a response with a 206 (Partial Content) status code
[866]845   containing the satisfiable ranges of the representation.
[8]846</t>
847<t>
[874]848   Examples of byte-ranges-specifier values (assuming a representation of
[8]849   length 10000):
850  <list style="symbols">
[565]851     <t>The first 500 bytes (byte offsets 0-499, inclusive):
852<figure><artwork type="example" x:indent-with="   ">
853  bytes=0-499
854</artwork></figure>
855    </t>
[8]856     <t>The second 500 bytes (byte offsets 500-999, inclusive):
[565]857<figure><artwork type="example" x:indent-with="   ">
858  bytes=500-999
859</artwork></figure>
860    </t>
[8]861     <t>The final 500 bytes (byte offsets 9500-9999, inclusive):
[565]862<figure><artwork type="example" x:indent-with="   ">
863  bytes=-500
864</artwork></figure>
865    Or:
866<figure><artwork type="example" x:indent-with="   ">
867  bytes=9500-
868</artwork></figure>
869    </t>
870     <t>The first and last bytes only (bytes 0 and 9999):
871<figure><artwork type="example" x:indent-with="   ">
872  bytes=0-0,-1
873</artwork></figure>
874     </t>
[8]875     <t>Several legal but not canonical specifications of the second 500
876        bytes (byte offsets 500-999, inclusive):
[565]877<figure><artwork type="example" x:indent-with="   ">
878  bytes=500-600,601-999
879  bytes=500-700,601-999
880</artwork></figure>
881     </t>
[8]882  </list>
883</t>
884</section>
885
886<section title="Range Retrieval Requests" anchor="range.retrieval.requests">
[229]887  <x:anchor-alias value="Range"/>
[564]888  <x:anchor-alias value="other-ranges-specifier"/>
[637]889  <x:anchor-alias value="other-range-set"/>
[8]890<t>
[1163]891   The "Range" header field defines the GET method (conditional or
[866]892   not) to request one or more sub-ranges of the response representation body, instead
893   of the entire representation body.
[8]894</t>
[393]895<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Range"/>
[1232]896  <x:ref>Range</x:ref> = <x:ref>byte-ranges-specifier</x:ref> / <x:ref>other-ranges-specifier</x:ref>
[637]897  <x:ref>other-ranges-specifier</x:ref> = <x:ref>other-range-unit</x:ref> "=" <x:ref>other-range-set</x:ref>
898  <x:ref>other-range-set</x:ref> = 1*<x:ref>CHAR</x:ref>
[8]899</artwork></figure>
900<t>
[1374]901   A server &MAY; ignore the Range header field. However, origin
[8]902   servers and intermediate caches ought to support byte ranges when
903   possible, since Range supports efficient recovery from partially
904   failed transfers, and supports efficient partial retrieval of large
[874]905   representations.
[8]906</t>
907<t>
[994]908   If the server supports the Range header field and the specified range or
[874]909   ranges are appropriate for the representation:
[8]910  <list style="symbols">
[994]911     <t>The presence of a Range header field in an unconditional GET modifies
[8]912        what is returned if the GET is otherwise successful. In other
913        words, the response carries a status code of 206 (Partial
914        Content) instead of 200 (OK).</t>
915
[994]916     <t>The presence of a Range header field in a conditional GET (a request
[8]917        using one or both of If-Modified-Since and If-None-Match, or
918        one or both of If-Unmodified-Since and If-Match) modifies what
919        is returned if the GET is otherwise successful and the
920        condition is true. It does not affect the 304 (Not Modified)
921        response returned if the conditional is false.</t>
922  </list>
923</t>
924<t>
925   In some cases, it might be more appropriate to use the If-Range
[994]926   header field (see <xref target="header.if-range"/>) in addition to the Range
927   header field.
[8]928</t>
929<t>
[1014]930   If a proxy that supports ranges receives a Range request, forwards
[874]931   the request to an inbound server, and receives an entire representation in
[1014]932   reply, it &MAY; only return the requested range to its client.
[8]933</t>
934</section>
935</section>
936</section>
937
[29]938<section title="IANA Considerations" anchor="IANA.considerations">
[700]939
940<section title="Status Code Registration" anchor="status.code.registration">
941<t>
942   The HTTP Status Code Registry located at <eref target="http://www.iana.org/assignments/http-status-codes"/>
[969]943   shall be updated with the registrations below:
[700]944</t>
945<?BEGININC p5-range.iana-status-codes ?>
946<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
947<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
948   <ttcol>Value</ttcol>
949   <ttcol>Description</ttcol>
950   <ttcol>Reference</ttcol>
951   <c>206</c>
952   <c>Partial Content</c>
953   <c>
954      <xref target="status.206"/>
955   </c>
956   <c>416</c>
957   <c>Requested Range Not Satisfiable</c>
958   <c>
959      <xref target="status.416"/>
960   </c>
961</texttable>
962<!--(END)-->
963<?ENDINC p5-range.iana-status-codes ?>
964</section>
965
[921]966<section title="Header Field Registration" anchor="header.field.registration">
[290]967<t>
[969]968   The Message Header Field Registry located at <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/> shall be updated
[290]969   with the permanent registrations below (see <xref target="RFC3864"/>):
970</t>
[680]971<?BEGININC p5-range.iana-headers ?>
[253]972<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
[290]973<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
[253]974   <ttcol>Header Field Name</ttcol>
975   <ttcol>Protocol</ttcol>
976   <ttcol>Status</ttcol>
977   <ttcol>Reference</ttcol>
978
979   <c>Accept-Ranges</c>
980   <c>http</c>
981   <c>standard</c>
982   <c>
983      <xref target="header.accept-ranges"/>
984   </c>
985   <c>Content-Range</c>
986   <c>http</c>
987   <c>standard</c>
988   <c>
989      <xref target="header.content-range"/>
990   </c>
991   <c>If-Range</c>
992   <c>http</c>
993   <c>standard</c>
994   <c>
995      <xref target="header.if-range"/>
996   </c>
997   <c>Range</c>
998   <c>http</c>
999   <c>standard</c>
1000   <c>
1001      <xref target="header.range"/>
1002   </c>
1003</texttable>
[290]1004<!--(END)-->
[680]1005<?ENDINC p5-range.iana-headers ?>
[253]1006<t>
[290]1007   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
1008</t>
[8]1009</section>
[930]1010
1011<section title="Range Specifier Registration" anchor="range.specifier.registration">
1012<t>
1013  The registration procedure for HTTP Range Specifiers is defined by
1014  <xref target="range.specifier.registry"/> of this document.
1015</t>
1016<t>
[969]1017   The HTTP Range Specifier Registry shall be created at <eref target="http://www.iana.org/assignments/http-range-specifiers"/>
[930]1018   and be populated with the registrations below:
1019</t>
1020<texttable align="left" suppress-title="true" anchor="iana.range.specifiers.table">
1021   <ttcol>Range Specifier Name</ttcol>
1022   <ttcol>Description</ttcol>
1023   <ttcol>Reference</ttcol>
1024
1025   <c>bytes</c>
1026   <c>a range of octets</c>
1027   <c>(this specification)</c>
1028</texttable>
1029<t>
1030   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
1031</t>
[253]1032</section>
[930]1033</section>
[8]1034
1035<section title="Security Considerations" anchor="security.considerations">
1036<t>
[1355]1037   This section is meant to inform application developers, information
1038   providers, and users of the security limitations in HTTP/1.1 as
1039   described by this document. The discussion does not include
1040   definitive solutions to the problems revealed, though it does make
1041   some suggestions for reducing security risks.
[8]1042</t>
[1355]1043<section title="Overlapping Ranges" anchor="overlapping.ranges">
1044<t>
1045   Range requests containing overlapping ranges may lead to the situation
1046   where a server is sending far more data than the size of the complete
1047   resource representation.
1048</t>
[8]1049</section>
[1355]1050</section>
[8]1051
[1364]1052<section title="Acknowledgments" anchor="acks">
[8]1053<t>
[1364]1054  See &acks;.
[8]1055</t>
1056</section>
1057</middle>
1058<back>
1059
[119]1060<references title="Normative References">
1061
[31]1062<reference anchor="Part1">
[119]1063  <front>
1064    <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
1065    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]1066      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]1067      <address><email>fielding@gbiv.com</email></address>
1068    </author>
1069    <author initials="J." surname="Gettys" fullname="Jim Gettys">
[844]1070      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
1071      <address><email>jg@freedesktop.org</email></address>
[119]1072    </author>
1073    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1074      <organization abbrev="HP">Hewlett-Packard Company</organization>
1075      <address><email>JeffMogul@acm.org</email></address>
1076    </author>
1077    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1078      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1079      <address><email>henrikn@microsoft.com</email></address>
1080    </author>
1081    <author initials="L." surname="Masinter" fullname="Larry Masinter">
[1106]1082      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]1083      <address><email>LMM@acm.org</email></address>
1084    </author>
1085    <author initials="P." surname="Leach" fullname="Paul J. Leach">
1086      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1087      <address><email>paulle@microsoft.com</email></address>
1088    </author>
1089    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1090      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1091      <address><email>timbl@w3.org</email></address>
1092    </author>
1093    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1094      <organization abbrev="W3C">World Wide Web Consortium</organization>
1095      <address><email>ylafon@w3.org</email></address>
1096    </author>
1097    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1098      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1099      <address><email>julian.reschke@greenbytes.de</email></address>
1100    </author>
1101    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1102  </front>
1103  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
1104  <x:source href="p1-messaging.xml" basename="p1-messaging"/>
[31]1105</reference>
1106
[1436]1107<reference anchor="Part2">
1108  <front>
1109    <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
1110    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1111      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1112      <address><email>fielding@gbiv.com</email></address>
1113    </author>
1114    <author initials="J." surname="Gettys" fullname="Jim Gettys">
1115      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
1116      <address><email>jg@freedesktop.org</email></address>
1117    </author>
1118    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1119      <organization abbrev="HP">Hewlett-Packard Company</organization>
1120      <address><email>JeffMogul@acm.org</email></address>
1121    </author>
1122    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1123      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1124      <address><email>henrikn@microsoft.com</email></address>
1125    </author>
1126    <author initials="L." surname="Masinter" fullname="Larry Masinter">
1127      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1128      <address><email>LMM@acm.org</email></address>
1129    </author>
1130    <author initials="P." surname="Leach" fullname="Paul J. Leach">
1131      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1132      <address><email>paulle@microsoft.com</email></address>
1133    </author>
1134    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1135      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1136      <address><email>timbl@w3.org</email></address>
1137    </author>
1138    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1139      <organization abbrev="W3C">World Wide Web Consortium</organization>
1140      <address><email>ylafon@w3.org</email></address>
1141    </author>
1142    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1143      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1144      <address><email>julian.reschke@greenbytes.de</email></address>
1145    </author>
1146    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1147  </front>
1148  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
1149  <x:source href="p2-semantics.xml" basename="p2-semantics"/>
1150</reference>
1151
[31]1152<reference anchor="Part4">
[119]1153  <front>
1154    <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
1155    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]1156      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]1157      <address><email>fielding@gbiv.com</email></address>
1158    </author>
1159    <author initials="J." surname="Gettys" fullname="Jim Gettys">
[844]1160      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
1161      <address><email>jg@freedesktop.org</email></address>
[119]1162    </author>
1163    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1164      <organization abbrev="HP">Hewlett-Packard Company</organization>
1165      <address><email>JeffMogul@acm.org</email></address>
1166    </author>
1167    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1168      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1169      <address><email>henrikn@microsoft.com</email></address>
1170    </author>
1171    <author initials="L." surname="Masinter" fullname="Larry Masinter">
[1106]1172      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]1173      <address><email>LMM@acm.org</email></address>
1174    </author>
1175    <author initials="P." surname="Leach" fullname="Paul J. Leach">
1176      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1177      <address><email>paulle@microsoft.com</email></address>
1178    </author>
1179    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1180      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1181      <address><email>timbl@w3.org</email></address>
1182    </author>
1183    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1184      <organization abbrev="W3C">World Wide Web Consortium</organization>
1185      <address><email>ylafon@w3.org</email></address>
1186    </author>
1187    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1188      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1189      <address><email>julian.reschke@greenbytes.de</email></address>
1190    </author>
1191    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1192  </front>
1193  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/>
1194  <x:source href="p4-conditional.xml" basename="p4-conditional"/>
[31]1195</reference>
1196
[1524]1197<reference anchor="Part6">
1198  <front>
1199    <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
1200    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1201      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1202      <address><email>fielding@gbiv.com</email></address>
1203    </author>
1204    <author initials="J." surname="Gettys" fullname="Jim Gettys">
1205      <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
1206      <address><email>jg@freedesktop.org</email></address>
1207    </author>
1208    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1209      <organization abbrev="HP">Hewlett-Packard Company</organization>
1210      <address><email>JeffMogul@acm.org</email></address>
1211    </author>
1212    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1213      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1214      <address><email>henrikn@microsoft.com</email></address>
1215    </author>
1216    <author initials="L." surname="Masinter" fullname="Larry Masinter">
1217      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1218      <address><email>LMM@acm.org</email></address>
1219    </author>
1220    <author initials="P." surname="Leach" fullname="Paul J. Leach">
1221      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1222      <address><email>paulle@microsoft.com</email></address>
1223    </author>
1224    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1225      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1226      <address><email>timbl@w3.org</email></address>
1227    </author>
1228    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1229      <organization abbrev="W3C">World Wide Web Consortium</organization>
1230      <address><email>ylafon@w3.org</email></address>
1231    </author>
1232    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
1233      <organization>Rackspace</organization>
1234      <address><email>mnot@mnot.net</email></address>
1235    </author>
1236    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1237      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1238      <address><email>julian.reschke@greenbytes.de</email></address>
1239    </author>
1240    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1241  </front>
1242  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
1243  <x:source href="p6-cache.xml" basename="p6-cache"/>
1244</reference>
1245
[131]1246<reference anchor="RFC2046">
1247  <front>
1248    <title abbrev="Media Types">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</title>
1249    <author initials="N." surname="Freed" fullname="Ned Freed">
1250      <organization>Innosoft International, Inc.</organization>
1251      <address><email>ned@innosoft.com</email></address>
1252    </author>
1253    <author initials="N." surname="Borenstein" fullname="Nathaniel S. Borenstein">
1254      <organization>First Virtual Holdings</organization>
1255      <address><email>nsb@nsb.fv.com</email></address>
1256    </author>
1257    <date month="November" year="1996"/>
1258  </front>
1259  <seriesInfo name="RFC" value="2046"/>
1260</reference>
1261
[119]1262<reference anchor="RFC2119">
1263  <front>
1264    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1265    <author initials="S." surname="Bradner" fullname="Scott Bradner">
1266      <organization>Harvard University</organization>
1267      <address><email>sob@harvard.edu</email></address>
1268    </author>
1269    <date month="March" year="1997"/>
1270  </front>
1271  <seriesInfo name="BCP" value="14"/>
1272  <seriesInfo name="RFC" value="2119"/>
1273</reference>
1274
[425]1275<reference anchor="RFC5234">
1276  <front>
1277    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
1278    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
1279      <organization>Brandenburg InternetWorking</organization>
1280      <address>
[728]1281        <email>dcrocker@bbiw.net</email>
1282      </address> 
[425]1283    </author>
1284    <author initials="P." surname="Overell" fullname="Paul Overell">
1285      <organization>THUS plc.</organization>
1286      <address>
[728]1287        <email>paul.overell@thus.net</email>
1288      </address>
[425]1289    </author>
1290    <date month="January" year="2008"/>
1291  </front>
1292  <seriesInfo name="STD" value="68"/>
1293  <seriesInfo name="RFC" value="5234"/>
1294</reference>
1295
[119]1296</references>
1297
1298<references title="Informative References">
1299
[36]1300<reference anchor="RFC2616">
[119]1301  <front>
1302    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1303    <author initials="R." surname="Fielding" fullname="R. Fielding">
1304      <organization>University of California, Irvine</organization>
1305      <address><email>fielding@ics.uci.edu</email></address>
1306    </author>
1307    <author initials="J." surname="Gettys" fullname="J. Gettys">
1308      <organization>W3C</organization>
1309      <address><email>jg@w3.org</email></address>
1310    </author>
1311    <author initials="J." surname="Mogul" fullname="J. Mogul">
1312      <organization>Compaq Computer Corporation</organization>
1313      <address><email>mogul@wrl.dec.com</email></address>
1314    </author>
1315    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
1316      <organization>MIT Laboratory for Computer Science</organization>
1317      <address><email>frystyk@w3.org</email></address>
1318    </author>
1319    <author initials="L." surname="Masinter" fullname="L. Masinter">
1320      <organization>Xerox Corporation</organization>
1321      <address><email>masinter@parc.xerox.com</email></address>
1322    </author>
1323    <author initials="P." surname="Leach" fullname="P. Leach">
1324      <organization>Microsoft Corporation</organization>
1325      <address><email>paulle@microsoft.com</email></address>
1326    </author>
1327    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
1328      <organization>W3C</organization>
1329      <address><email>timbl@w3.org</email></address>
1330    </author>
1331    <date month="June" year="1999"/>
1332  </front>
1333  <seriesInfo name="RFC" value="2616"/>
[36]1334</reference>
1335
[253]1336<reference anchor='RFC3864'>
1337  <front>
1338    <title>Registration Procedures for Message Header Fields</title>
1339    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
1340      <organization>Nine by Nine</organization>
1341      <address><email>GK-IETF@ninebynine.org</email></address>
1342    </author>
1343    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
1344      <organization>BEA Systems</organization>
1345      <address><email>mnot@pobox.com</email></address>
1346    </author>
1347    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
1348      <organization>HP Labs</organization>
1349      <address><email>JeffMogul@acm.org</email></address>
1350    </author>
1351    <date year='2004' month='September' />
1352  </front>
1353  <seriesInfo name='BCP' value='90' />
1354  <seriesInfo name='RFC' value='3864' />
1355</reference>
1356
[196]1357<reference anchor="RFC4288">
1358  <front>
1359    <title>Media Type Specifications and Registration Procedures</title>
1360    <author initials="N." surname="Freed" fullname="N. Freed">
1361      <organization>Sun Microsystems</organization>
1362      <address>
1363        <email>ned.freed@mrochek.com</email>
1364      </address>
1365    </author>
1366    <author initials="J." surname="Klensin" fullname="J. Klensin">
1367      <address>
1368        <email>klensin+ietf@jck.com</email>
1369      </address>
1370    </author>
1371    <date year="2005" month="December"/>
1372  </front>
1373  <seriesInfo name="BCP" value="13"/>
1374  <seriesInfo name="RFC" value="4288"/>
1375</reference>
1376
[930]1377<reference anchor='RFC5226'>
1378  <front>
1379    <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
1380    <author initials='T.' surname='Narten' fullname='T. Narten'>
1381      <organization>IBM</organization>
1382      <address><email>narten@us.ibm.com</email></address>
1383    </author>
1384    <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
1385      <organization>Google</organization>
1386      <address><email>Harald@Alvestrand.no</email></address>
1387    </author>
1388    <date year='2008' month='May' />
1389  </front>
1390  <seriesInfo name='BCP' value='26' />
1391  <seriesInfo name='RFC' value='5226' />
1392</reference>
1393
[119]1394</references>
1395
[8]1396<section title="Internet Media Type multipart/byteranges" anchor="internet.media.type.multipart.byteranges">
1397<iref item="Media Type" subitem="multipart/byteranges" primary="true"/>
1398<iref item="multipart/byteranges Media Type" primary="true"/>
1399<t>
1400   When an HTTP 206 (Partial Content) response message includes the
1401   content of multiple ranges (a response to a request for multiple
1402   non-overlapping ranges), these are transmitted as a multipart
[328]1403   message-body (<xref target="RFC2046" x:fmt="," x:sec="5.1"/>). The media type for this purpose is called
[196]1404   "multipart/byteranges".  The following is to be registered with IANA <xref target="RFC4288"/>.
[644]1405</t>
1406<x:note>
1407  <t>
1408    <x:h>Note:</x:h> Despite the name "multipart/byteranges" is not limited to the byte ranges only.
1409  </t>
1410</x:note>
1411<t>
[332]1412   The multipart/byteranges media type includes one or more parts, each
[8]1413   with its own Content-Type and Content-Range fields. The required
1414   boundary parameter specifies the boundary string used to separate
1415   each body-part.
1416</t>
1417<t>
1418  <list style="hanging" x:indent="12em">
[196]1419    <t hangText="Type name:">
[8]1420      multipart
1421    </t>
[196]1422    <t hangText="Subtype name:">
[8]1423      byteranges
1424    </t>
1425    <t hangText="Required parameters:">
1426      boundary
1427    </t>
1428    <t hangText="Optional parameters:">
1429      none
1430    </t>
1431    <t hangText="Encoding considerations:">
1432      only "7bit", "8bit", or "binary" are permitted
1433    </t>
1434    <t hangText="Security considerations:">
1435      none
1436    </t>
[196]1437    <t hangText="Interoperability considerations:">
1438      none
1439    </t>
1440    <t hangText="Published specification:">
1441      This specification (see <xref target="internet.media.type.multipart.byteranges"/>).
1442    </t>
1443    <t hangText="Applications that use this media type:">
1444    </t>
1445    <t hangText="Additional information:">
1446      <list style="hanging">
1447        <t hangText="Magic number(s):">none</t>
1448        <t hangText="File extension(s):">none</t>
1449        <t hangText="Macintosh file type code(s):">none</t>
1450      </list>
1451    </t>
1452    <t hangText="Person and email address to contact for further information:">
1453      See Authors Section.
1454    </t>
[609]1455    <t hangText="Intended usage:">
1456      COMMON
[196]1457    </t>
[609]1458    <t hangText="Restrictions on usage:">
1459      none
[196]1460    </t>
1461    <t hangText="Author/Change controller:">
1462      IESG
1463    </t>
[8]1464  </list>
1465</t>
1466<figure><preamble>
1467   For example:
1468</preamble><artwork type="example">
[435]1469  HTTP/1.1 206 Partial Content
1470  Date: Wed, 15 Nov 1995 06:25:24 GMT
1471  Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
1472  Content-type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
1473 
1474  --THIS_STRING_SEPARATES
1475  Content-type: application/pdf
1476  Content-range: bytes 500-999/8000
1477 
1478  ...the first range...
1479  --THIS_STRING_SEPARATES
1480  Content-type: application/pdf
1481  Content-range: bytes 7000-7999/8000
1482 
1483  ...the second range
1484  --THIS_STRING_SEPARATES--
[8]1485</artwork></figure>
[644]1486<figure><preamble>
1487   Other example:
1488</preamble>
1489<artwork type="example">
1490  HTTP/1.1 206 Partial Content
1491  Date: Tue, 14 Nov 1995 06:25:24 GMT
1492  Last-Modified: Tue, 14 July 04:58:08 GMT
1493  Content-type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
1494 
1495  --THIS_STRING_SEPARATES
1496  Content-type: video/example
1497  Content-range: exampleunit 1.2-4.3/25
1498 
1499  ...the first range...
1500  --THIS_STRING_SEPARATES
[645]1501  Content-type: video/example
1502  Content-range: exampleunit 11.2-14.3/25
[644]1503 
1504  ...the second range
1505  --THIS_STRING_SEPARATES--
1506</artwork>
1507</figure>
[8]1508<t>
1509      Notes:
1510  <list style="numbers">
[908]1511      <t>Additional CRLFs &MAY; precede the first boundary string in the body.</t>
[8]1512
[97]1513      <t>Although <xref target="RFC2046"/> permits the boundary string to be
[8]1514         quoted, some existing implementations handle a quoted boundary
1515         string incorrectly.</t>
1516
1517      <t>A number of browsers and servers were coded to an early draft
1518         of the byteranges specification to use a media type of
1519         multipart/x-byteranges<iref item="multipart/x-byteranges Media Type"/><iref item="Media Type" subitem="multipart/x-byteranges"/>, which is almost, but not quite
1520         compatible with the version documented in HTTP/1.1.</t>
1521  </list>
1522</t>
1523</section>
1524
[99]1525<section title="Compatibility with Previous Versions" anchor="compatibility">
1526<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
[105]1527<t>
[1374]1528  Clarify that it is not ok to use a weak validator in a 206 response.
[105]1529  (<xref target="status.206"/>)
1530</t>
[332]1531<t>
[1232]1532  Change ABNF productions for header fields to only define the field value.
[1415]1533  (<xref target="header.field.definitions"/>)
[1232]1534</t>
1535<t>
[332]1536  Clarify that multipart/byteranges can consist of a single part.
1537  (<xref target="internet.media.type.multipart.byteranges"/>)
1538</t>
[99]1539</section>
1540
1541</section>
1542
[680]1543<?BEGININC p5-range.abnf-appendix ?>
[427]1544<section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
1545<figure>
1546<artwork type="abnf" name="p5-range.parsed-abnf">
[1232]1547<x:ref>Accept-Ranges</x:ref> = acceptable-ranges
[427]1548
[1398]1549<x:ref>Content-Range</x:ref> = byte-content-range-spec / other-content-range-spec
[427]1550
[1436]1551<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part2], Section 8&gt;
[427]1552
[1232]1553<x:ref>If-Range</x:ref> = entity-tag / HTTP-date
[427]1554
[1523]1555<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 3.2.1&gt;
[427]1556
[1232]1557<x:ref>Range</x:ref> = byte-ranges-specifier / other-ranges-specifier
[427]1558
1559<x:ref>acceptable-ranges</x:ref> = ( *( "," OWS ) range-unit *( OWS "," [ OWS
[425]1560 range-unit ] ) ) / "none"
[428]1561
[427]1562<x:ref>byte-content-range-spec</x:ref> = bytes-unit SP byte-range-resp-spec "/" (
[425]1563 instance-length / "*" )
[427]1564<x:ref>byte-range-resp-spec</x:ref> = ( first-byte-pos "-" last-byte-pos ) / "*"
1565<x:ref>byte-range-set</x:ref> = ( *( "," OWS ) byte-range-spec ) / (
[425]1566 suffix-byte-range-spec *( OWS "," [ ( OWS byte-range-spec ) /
1567 suffix-byte-range-spec ] ) )
[427]1568<x:ref>byte-range-spec</x:ref> = first-byte-pos "-" [ last-byte-pos ]
1569<x:ref>byte-ranges-specifier</x:ref> = bytes-unit "=" byte-range-set
1570<x:ref>bytes-unit</x:ref> = "bytes"
1571
[1383]1572<x:ref>entity-tag</x:ref> = &lt;entity-tag, defined in [Part4], Section 2.3&gt;
[427]1573
1574<x:ref>first-byte-pos</x:ref> = 1*DIGIT
1575
1576<x:ref>instance-length</x:ref> = 1*DIGIT
1577
1578<x:ref>last-byte-pos</x:ref> = 1*DIGIT
1579
1580<x:ref>other-content-range-spec</x:ref> = other-range-unit SP other-range-resp-spec
1581<x:ref>other-range-resp-spec</x:ref> = *CHAR
[638]1582<x:ref>other-range-set</x:ref> = 1*CHAR
[427]1583<x:ref>other-range-unit</x:ref> = token
[638]1584<x:ref>other-ranges-specifier</x:ref> = other-range-unit "=" other-range-set
[427]1585
1586<x:ref>range-unit</x:ref> = bytes-unit / other-range-unit
1587
1588<x:ref>suffix-byte-range-spec</x:ref> = "-" suffix-length
1589<x:ref>suffix-length</x:ref> = 1*DIGIT
1590
[1523]1591<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 3.2.4&gt;
[454]1592</artwork>
1593</figure>
[532]1594<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
1595; Accept-Ranges defined but not used
[425]1596; Content-Range defined but not used
1597; If-Range defined but not used
1598; Range defined but not used
[454]1599</artwork></figure></section>
[680]1600<?ENDINC p5-range.abnf-appendix ?>
[427]1601
[679]1602
[252]1603<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
[99]1604
[1002]1605<section title="Since RFC 2616">
[115]1606<t>
1607  Extracted relevant partitions from <xref target="RFC2616"/>.
1608</t>
1609</section>
1610
1611<section title="Since draft-ietf-httpbis-p5-range-00">
1612<t>
[116]1613  Closed issues:
1614  <list style="symbols"> 
1615    <t>
[324]1616      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/18"/>:
[116]1617      "Cache validators in 206 responses"
1618      (<eref target="http://purl.org/NET/http-errata#ifrange206"/>)
1619    </t>
[131]1620    <t>
[324]1621      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/35"/>:
[152]1622      "Normative and Informative references"
1623    </t>
1624    <t>
[324]1625      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/86"/>:
[131]1626      "Normative up-to-date references"
1627    </t>
[116]1628  </list>
[115]1629</t>
1630</section>
1631
[170]1632<section title="Since draft-ietf-httpbis-p5-range-01">
1633<t>
[200]1634  Closed issues:
1635  <list style="symbols"> 
1636    <t>
[324]1637      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/55"/>:
[200]1638      "Updating to RFC4288"
1639    </t>
1640  </list>
[170]1641</t>
[205]1642<t>
[324]1643  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
[205]1644  <list style="symbols"> 
1645    <t>
1646      Add explicit references to BNF syntax and rules imported from other parts of the specification.
1647    </t>
1648  </list>
1649</t>
[115]1650</section>
1651
[252]1652<section title="Since draft-ietf-httpbis-p5-range-02" anchor="changes.since.02">
[228]1653<t>
[994]1654  Ongoing work on IANA Message Header Field Registration (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/40"/>):
[253]1655  <list style="symbols"> 
1656    <t>
[994]1657      Reference RFC 3984, and update header field registrations for headers defined
[253]1658      in this document.
1659    </t>
1660  </list>
[228]1661</t>
[170]1662</section>
1663
[267]1664<section title="Since draft-ietf-httpbis-p5-range-03" anchor="changes.since.03">
1665<t>
[1232]1666  None.
[267]1667</t>
[228]1668</section>
1669
[323]1670<section title="Since draft-ietf-httpbis-p5-range-04" anchor="changes.since.04">
1671<t>
[332]1672  Closed issues:
1673  <list style="symbols"> 
1674    <t>
1675      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/133"/>:
1676      "multipart/byteranges minimum number of parts"
1677    </t>
1678  </list>
[323]1679</t>
[334]1680<t>
1681  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
1682  <list style="symbols"> 
1683    <t>
1684      Use "/" instead of "|" for alternatives.
1685    </t>
[363]1686    <t>
1687      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
1688      whitespace ("OWS") and required whitespace ("RWS").
1689    </t>
1690    <t>
1691      Rewrite ABNFs to spell out whitespace rules, factor out
[994]1692      header field value format definitions.
[363]1693    </t>
[334]1694  </list>
1695</t>
[267]1696</section>
1697
[382]1698<section title="Since draft-ietf-httpbis-p5-range-05" anchor="changes.since.05">
1699<t>
[438]1700  Closed issues:
1701  <list style="symbols"> 
1702    <t>
1703      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/142"/>:
1704      "State base for *-byte-pos and suffix-length"
1705    </t>
1706  </list>
1707</t>
1708<t>
[393]1709  Ongoing work on Custom Ranges (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/85"/>):
1710  <list style="symbols"> 
1711    <t>
1712      Remove bias in favor of byte ranges; allow custom ranges in ABNF.
1713    </t>
1714  </list>
[382]1715</t>
[421]1716<t>
[543]1717  Final work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
[421]1718  <list style="symbols"> 
1719    <t>
[424]1720      Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.
[421]1721    </t>
1722  </list>
1723</t>
[323]1724</section>
1725
[547]1726<section title="Since draft-ietf-httpbis-p5-range-06" anchor="changes.since.06">
1727<t>
[576]1728  Closed issues:
1729  <list style="symbols"> 
1730    <t>
1731      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/161"/>:
1732      "base for numeric protocol elements"
1733    </t>
1734  </list>
[547]1735</t>
[382]1736</section>
1737
[604]1738<section title="Since draft-ietf-httpbis-p5-range-07" anchor="changes.since.07">
1739<t>
[618]1740  Closed issues:
1741  <list style="symbols">
1742    <t>
1743      Fixed discrepancy in the If-Range definition about allowed validators.
1744    </t>
[637]1745    <t>
[839]1746      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/150" />: "multipart/byteranges for custom range units"
[644]1747    </t>
1748    <t>
[839]1749      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/151" />: "range unit missing from other-ranges-specifier in Range header"
[637]1750    </t>
[700]1751    <t>
1752      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/198"/>:
1753      "move IANA registrations for optional status codes"
1754    </t>
[618]1755  </list>
[604]1756</t>
[547]1757</section>
1758
[720]1759<section title="Since draft-ietf-httpbis-p5-range-08" anchor="changes.since.08">
1760<t>
[765]1761  No significant changes.
[720]1762</t>
[604]1763</section>
1764
[773]1765<section title="Since draft-ietf-httpbis-p5-range-09" anchor="changes.since.09">
1766<t>
[841]1767 No significant changes.
1768</t>
1769</section>
1770
1771<section title="Since draft-ietf-httpbis-p5-range-10" anchor="changes.since.10">
1772<t>
[863]1773  Closed issues:
1774  <list style="symbols"> 
1775    <t>
1776      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/69"/>:
1777      "Clarify 'Requested Variant'"
1778    </t>
1779    <t>
1780      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/109"/>:
1781      "Clarify entity / representation / variant terminology"
1782    </t>
[911]1783    <t>
1784      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/220"/>:
1785      "consider removing the 'changes from 2068' sections"
1786    </t>
[863]1787  </list>
[773]1788</t>
[930]1789<t>
1790  Ongoing work on Custom Ranges (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/85"/>):
1791  <list style="symbols"> 
1792    <t>
1793      Add IANA registry.
1794    </t>
1795  </list>
1796</t>
[720]1797</section>
1798
[973]1799<section title="Since draft-ietf-httpbis-p5-range-11" anchor="changes.since.11">
1800<t>
[1014]1801  Closed issues:
1802  <list style="symbols"> 
1803    <t>
1804      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/217"/>:
1805      "Caches can't be required to serve ranges"
1806    </t>
1807  </list>
[973]1808</t>
[773]1809</section>
1810
[1052]1811<section title="Since draft-ietf-httpbis-p5-range-12" anchor="changes.since.12">
1812<t>
[1165]1813  Closed issues:
1814  <list style="symbols"> 
1815    <t>
1816      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/224"/>:
1817      "Header Classification"
1818    </t>
1819  </list>
[1052]1820</t>
[973]1821</section>
1822
[1180]1823<section title="Since draft-ietf-httpbis-p5-range-13" anchor="changes.since.13">
1824<t>
[1232]1825  Closed issues:
1826  <list style="symbols">
1827    <t>
1828      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/276"/>:
1829      "untangle ABNFs for header fields"
1830    </t>
1831  </list>
[1180]1832</t>
[1052]1833</section>
1834
[1271]1835<section title="Since draft-ietf-httpbis-p5-range-14" anchor="changes.since.14">
1836<t>
[1328]1837  None.
[1271]1838</t>
[1180]1839</section>
1840
[1326]1841<section title="Since draft-ietf-httpbis-p5-range-15" anchor="changes.since.15">
1842<t>
[1355]1843  Closed issues:
1844  <list style="symbols">
1845    <t>
1846      <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/175"/>:
1847      "Security consideration: range flooding"
1848    </t>
1849  </list>
[1326]1850</t>
[1271]1851</section>
1852
[1401]1853<section title="Since draft-ietf-httpbis-p5-range-16" anchor="changes.since.16">
1854<t>
[1452]1855  Closed issues:
1856  <list style="symbols"> 
1857    <t>
1858      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/186"/>:
1859      "Document HTTP's error-handling philosophy"
1860    </t>
[1456]1861    <t>
[1461]1862      <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/301"/>:
1863      "Content-Range on responses other than 206"
1864    </t>
1865    <t>
[1456]1866      <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/319"/>:
1867      "case sensitivity of ranges in p5"
1868    </t>
[1452]1869  </list>
[1401]1870</t>
[1326]1871</section>
1872
[1467]1873<section title="Since draft-ietf-httpbis-p5-range-17" anchor="changes.since.17">
1874<t>
[1499]1875  None.
[1467]1876</t>
[1401]1877</section>
1878
[1499]1879<section title="Since draft-ietf-httpbis-p5-range-18" anchor="changes.since.18">
1880<t>
1881  None yet.
1882</t>
[1467]1883</section>
1884
[1499]1885</section>
1886
[8]1887</back>
1888</rfc>
Note: See TracBrowser for help on using the repository browser.