source: draft-ietf-httpbis/17/p5-range.xml @ 1500

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

fix mime types

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