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

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

editorial fixes (#553)

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 62.6 KB
[29]1<?xml version="1.0" encoding="utf-8"?>
[101]2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
[8]3<!DOCTYPE rfc [
4  <!ENTITY MAY "<bcp14 xmlns=''>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns=''>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns=''>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns=''>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns=''>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns=''>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns=''>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns=''>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns=''>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns=''>SHOULD NOT</bcp14>">
[29]14  <!ENTITY ID-VERSION "latest">
[2628]15  <!ENTITY ID-MONTH "May">
[2527]16  <!ENTITY ID-YEAR "2014">
[2547]17  <!ENTITY mdash "&#8212;">
[1692]18  <!ENTITY Note "<x:h xmlns:x=''>Note:</x:h>">
[2629]19  <!ENTITY architecture               "<xref target='RFC7230' x:rel='#architecture' xmlns:x=''/>">
20  <!ENTITY conformance                "<xref target='RFC7230' x:rel='#conformance' xmlns:x=''/>">
21  <!ENTITY notation                   "<xref target='RFC7230' x:rel='#notation' xmlns:x=''/>">
22  <!ENTITY abnf-extension             "<xref target='RFC7230' x:rel='#abnf.extension' xmlns:x=''/>">
23  <!ENTITY acks                       "<xref target='RFC7230' x:rel='#acks' xmlns:x=''/>">
24  <!ENTITY whitespace                 "<xref target='RFC7230' x:rel='#whitespace' xmlns:x=''/>">
25  <!ENTITY field-components           "<xref target='RFC7230' x:rel='#field.components' xmlns:x=''/>">
26  <!ENTITY messaging                  "<xref target='RFC7230' xmlns:x=''/>">
27  <!ENTITY semantics                  "<xref target='RFC7231' xmlns:x=''/>">
28  <!ENTITY http-date                  "<xref target='RFC7231' x:rel='' xmlns:x=''/>">
29  <!ENTITY representation             "<xref target='RFC7231' x:rel='#representations' xmlns:x=''/>">
30  <!ENTITY entity-tags                "<xref target='RFC7232' x:rel='#header.etag' xmlns:x=''/>">
31  <!ENTITY weak-and-strong-validators "<xref target='RFC7232' x:rel='#weak.and.strong.validators' xmlns:x=''/>">
32  <!ENTITY entity-tag-comparison      "<xref target='RFC7232' x:rel='#entity.tag.comparison' xmlns:x=''/>">
33  <!ENTITY lastmod-comparison         "<xref target='RFC7232' x:rel='#lastmod.comparison' xmlns:x=''/>">
34  <!ENTITY p6-heuristic               "<xref target='RFC7234' x:rel='#heuristic.freshness' xmlns:x=''/>">
36<?rfc toc="yes" ?>
[29]37<?rfc symrefs="yes" ?>
38<?rfc sortrefs="yes" ?>
[8]39<?rfc compact="yes"?>
40<?rfc subcompact="no" ?>
41<?rfc linkmailto="no" ?>
42<?rfc editing="no" ?>
[203]43<?rfc comments="yes"?>
44<?rfc inline="yes"?>
[799]45<?rfc rfcedstyle="yes"?>
[8]46<?rfc-ext allow-markup-in-artwork="yes" ?>
47<?rfc-ext include-references-in-index="yes" ?>
[1477]48<rfc obsoletes="2616" category="std" x:maturity-level="proposed"
49     ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p5-range-&ID-VERSION;"
50     xmlns:x=''>
[1472]51<x:link rel="prev" basename="p4-conditional"/>
52<x:link rel="next" basename="p6-cache"/>
[1522]53<x:feedback template="{docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>
[1864]56  <title abbrev="HTTP/1.1 Range Requests">Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
[29]58  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]59    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[8]60    <address>
61      <postal>
[1106]62        <street>345 Park Ave</street>
63        <city>San Jose</city>
[8]64        <region>CA</region>
[1106]65        <code>95110</code>
[29]66        <country>USA</country>
[8]67      </postal>
[29]68      <email></email>
69      <uri></uri>
[8]70    </address>
71  </author>
[95]73  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
[94]74    <organization abbrev="W3C">World Wide Web Consortium</organization>
75    <address>
76      <postal>
77        <street>W3C / ERCIM</street>
78        <street>2004, rte des Lucioles</street>
79        <city>Sophia-Antipolis</city>
80        <region>AM</region>
81        <code>06902</code>
82        <country>France</country>
83      </postal>
84      <email></email>
85      <uri></uri>
86    </address>
87  </author>
[95]89  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
90    <organization abbrev="greenbytes">greenbytes GmbH</organization>
91    <address>
92      <postal>
93        <street>Hafenweg 16</street>
94        <city>Muenster</city><region>NW</region><code>48155</code>
95        <country>Germany</country>
96      </postal>
[609]97      <email></email>
98      <uri></uri>
[95]99    </address>
100  </author>
[31]102  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
[2610]104  <area>Applications</area>
105  <workgroup>HTTPbis</workgroup>
[2662]107  <keyword>Hypertext Transfer Protocol</keyword>
108  <keyword>HTTP</keyword>
109  <keyword>HTTP Range Requests</keyword>
[2554]113   The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for
[1808]114   distributed, collaborative, hypertext information systems. This document
115   defines range requests and the rules for constructing and combining
116   responses to those requests.
120<note title="Editorial Note (To be removed by RFC Editor)">
121  <t>
[1764]122    Discussion of this draft takes place on the HTTPBIS working group
[1268]123    mailing list (, which is archived at
124    <eref target=""/>.
125  </t>
126  <t>
127    The current issues list is at
128    <eref target=""/> and related
129    documents (including fancy diffs) can be found at
[324]130    <eref target=""/>.
[36]131  </t>
[153]132  <t>
[2632]133    <spanx>This is a temporary document for the purpose of tracking the editorial changes made during the AUTH48 (RFC publication) phase.</spanx>
[153]134  </t>
138<section title="Introduction" anchor="introduction">
[2144]140   Hypertext Transfer Protocol (HTTP) clients often encounter interrupted data
141   transfers as a result of canceled requests or dropped connections. When a
142   client has stored a partial representation, it is desirable to request the
143   remainder of that representation in a subsequent request rather than
144   transfer the entire representation. Likewise, devices with limited local
145   storage might benefit from being able to request only a subset of a larger
146   representation, such as a single page of a very large document, or the
147   dimensions of an embedded image.
[2144]150   This document defines HTTP/1.1 range requests, partial responses, and the
[2217]151   multipart/byteranges media type. Range requests are an &OPTIONAL; feature
[2144]152   of HTTP, designed so that recipients not implementing this feature (or not
153   supporting it for the target resource) can respond as if it is a normal
154   GET request without impacting interoperability. Partial responses are
155   indicated by a distinct status code to not be mistaken for full responses
156   by caches that might not implement the feature.
[2144]159   Although the range request mechanism is designed to allow for
[158]160   extensible range types, this specification only defines requests for
161   byte ranges.
[1875]164<section title="Conformance and Error Handling" anchor="conformance">
166   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
167   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
168   document are to be interpreted as described in <xref target="RFC2119"/>.
[1875]171   Conformance criteria and considerations regarding error handling
172   are defined in &conformance;.
[424]176<section title="Syntax Notation" anchor="notation">
[2525]178   This specification uses the Augmented Backus-Naur Form (ABNF) notation of
[2531]179   <xref target="RFC5234"/> with a list extension, defined in
180   &abnf-extension;, that allows for compact definition of
181   comma-separated lists using a '#' operator (similar to how the '*' operator
182   indicates repetition).
[2525]183   <xref target="imported.abnf"/> describes rules imported from
184   other documents.
[2531]185   <xref target="collected.abnf"/> shows the collected grammar with all list
186   operators expanded to standard ABNF notation.
[8]192<section title="Range Units" anchor="range.units">
[229]193  <x:anchor-alias value="range-unit"/>
[2135]194  <x:anchor-alias value="range unit"/>
[2135]196   A representation can be partitioned into subranges according to various
197   structural units, depending on the structure inherent in the
[2144]198   representation's media type. This "<x:dfn>range unit</x:dfn>" is used
199   in the <x:ref>Accept-Ranges</x:ref> (<xref target="header.accept-ranges"/>)
200   response header field to advertise support for range requests, the
201   <x:ref>Range</x:ref> (<xref target="header.range"/>) request header field
202   to delineate the parts of a representation that are requested, and the
[1738]203   <x:ref>Content-Range</x:ref> (<xref target="header.content-range"/>)
[2144]204   payload header field to describe which part of a representation is being
205   transferred.
[2144]207<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="range-unit"/><iref item="Grammar" subitem="bytes-unit"/><iref item="Grammar" subitem="other-range-unit"/>
[334]208  <x:ref>range-unit</x:ref>       = <x:ref>bytes-unit</x:ref> / <x:ref>other-range-unit</x:ref>
211<section title="Byte Ranges" anchor="byte.ranges">
[2144]212  <x:anchor-alias value="bytes-unit"/>
[2144]214   Since representation data is transferred in payloads as a sequence of
215   octets, a byte range is a meaningful substructure for any representation
[2563]216   transferable over HTTP (&representation;). The "bytes" range unit is
217   defined for expressing subranges of the data's octet sequence.
[2144]219<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="bytes-unit"/>
220  <x:ref>bytes-unit</x:ref>       = "bytes"
[2140]222<t anchor="rule.ranges-specifier">
223  <x:anchor-alias value="byte-range-set"/>
224  <x:anchor-alias value="byte-range-spec"/>
225  <x:anchor-alias value="byte-ranges-specifier"/>
226  <x:anchor-alias value="first-byte-pos"/>
227  <x:anchor-alias value="last-byte-pos"/>
228  <x:anchor-alias value="ranges-specifier"/>
229  <x:anchor-alias value="suffix-byte-range-spec"/>
230  <x:anchor-alias value="suffix-length"/>
[2687]231   A byte-range request can specify a single range of bytes or a set
[2140]232   of ranges within a single representation.
234<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"/>
235  <x:ref>byte-ranges-specifier</x:ref> = <x:ref>bytes-unit</x:ref> "=" <x:ref>byte-range-set</x:ref>
236  <x:ref>byte-range-set</x:ref>  = 1#( <x:ref>byte-range-spec</x:ref> / <x:ref>suffix-byte-range-spec</x:ref> )
237  <x:ref>byte-range-spec</x:ref> = <x:ref>first-byte-pos</x:ref> "-" [ <x:ref>last-byte-pos</x:ref> ]
238  <x:ref>first-byte-pos</x:ref>  = 1*<x:ref>DIGIT</x:ref>
239  <x:ref>last-byte-pos</x:ref>   = 1*<x:ref>DIGIT</x:ref>
[2150]242   The <x:ref>first-byte-pos</x:ref> value in a <x:ref>byte-range-spec</x:ref>
243   gives the byte-offset of the first byte in a range.
244   The <x:ref>last-byte-pos</x:ref> value gives the byte-offset of the last
245   byte in the range; that is, the byte positions specified are inclusive.
246   Byte offsets start at zero.
[2150]249   Examples of <x:ref>byte-ranges-specifier</x:ref> values:
[2145]250  <list style="symbols">
251     <t>The first 500 bytes (byte offsets 0-499, inclusive):
252<figure><artwork type="example" x:indent-with="   ">
253  bytes=0-499
255    </t>
256     <t>The second 500 bytes (byte offsets 500-999, inclusive):
257<figure><artwork type="example" x:indent-with="   ">
258  bytes=500-999
260    </t>
261  </list>
[2150]264   A <x:ref>byte-range-spec</x:ref> is invalid if the
265   <x:ref>last-byte-pos</x:ref> value is present and less than the
266   <x:ref>first-byte-pos</x:ref>.
[2150]269   A client can limit the number of bytes requested without knowing the size
270   of the selected representation.
271   If the <x:ref>last-byte-pos</x:ref> value is absent, or if the value is
272   greater than or equal to the current length of the representation data, the
273   byte range is interpreted as the remainder of the representation (i.e., the
274   server replaces the value of <x:ref>last-byte-pos</x:ref> with a value that
275   is one less than the current length of the selected representation).
[2150]278   A client can request the last N bytes of the selected representation using
279   a <x:ref>suffix-byte-range-spec</x:ref>.
281<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="suffix-byte-range-spec"/><iref primary="true" item="Grammar" subitem="suffix-length"/>
282  <x:ref>suffix-byte-range-spec</x:ref> = "-" <x:ref>suffix-length</x:ref>
283  <x:ref>suffix-length</x:ref> = 1*<x:ref>DIGIT</x:ref>
[2150]286   If the selected representation is shorter than the specified
287   <x:ref>suffix-length</x:ref>, the entire representation is used.
290   Additional examples, assuming a representation of length 10000:
[2140]291  <list style="symbols">
292     <t>The final 500 bytes (byte offsets 9500-9999, inclusive):
293<figure><artwork type="example" x:indent-with="   ">
294  bytes=-500
296    Or:
297<figure><artwork type="example" x:indent-with="   ">
298  bytes=9500-
300    </t>
301     <t>The first and last bytes only (bytes 0 and 9999):
302<figure><artwork type="example" x:indent-with="   ">
303  bytes=0-0,-1
305     </t>
[2144]306     <t>Other valid (but not canonical) specifications of the second 500
[2140]307        bytes (byte offsets 500-999, inclusive):
308<figure><artwork type="example" x:indent-with="   ">
309  bytes=500-600,601-999
310  bytes=500-700,601-999
312     </t>
313  </list>
[2150]316   If a valid <x:ref>byte-range-set</x:ref> includes at least one
317   <x:ref>byte-range-spec</x:ref> with a <x:ref>first-byte-pos</x:ref> that is
318   less than the current length of the representation, or at least one
319   <x:ref>suffix-byte-range-spec</x:ref> with a non-zero
320   <x:ref>suffix-length</x:ref>, then the <x:ref>byte-range-set</x:ref> is
321   satisfiable. Otherwise, the <x:ref>byte-range-set</x:ref> is unsatisfiable.
[2687]324   In the byte-range syntax, <x:ref>first-byte-pos</x:ref>,
[2145]325   <x:ref>last-byte-pos</x:ref>, and <x:ref>suffix-length</x:ref> are
[2150]326   expressed as decimal number of octets. Since there is no predefined limit
[2480]327   to the length of a payload, recipients &MUST; anticipate potentially
[2150]328   large decimal numerals and prevent parsing errors due to integer conversion
329   overflows.
333<section title="Other Range Units" anchor="range.units.other">
[2144]334  <x:anchor-alias value="other-range-unit"/>
[2144]336  Range units are intended to be extensible.  New range units ought to be
337  registered with IANA, as defined in <xref target="range.unit.registry"/>.
[2144]339<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="other-range-unit"/>
340  <x:ref>other-range-unit</x:ref> = <x:ref>token</x:ref>
[2142]344<section title="Accept-Ranges" anchor="header.accept-ranges">
345  <iref primary="true" item="Accept-Ranges header field" x:for-anchor=""/>
346  <x:anchor-alias value="Accept-Ranges"/>
347  <x:anchor-alias value="acceptable-ranges"/>
[2150]349   The "Accept-Ranges" header field allows a server to indicate that it
350   supports range requests for the target resource.
352<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Accept-Ranges"/><iref primary="true" item="Grammar" subitem="acceptable-ranges"/>
353  <x:ref>Accept-Ranges</x:ref>     = <x:ref>acceptable-ranges</x:ref>
354  <x:ref>acceptable-ranges</x:ref> = 1#<x:ref>range-unit</x:ref> / "none"
[2402]357   An origin server that supports byte-range requests for a given target
358   resource &MAY; send
360<figure><artwork type="example">
361  Accept-Ranges: bytes
[2402]364   to indicate what range units are supported. A client &MAY; generate range
[2142]365   requests without having received this header field for the resource
366   involved. Range units are defined in <xref target="range.units"/>.
[2402]369   A server that does not support any kind of range request for the target
[2438]370   resource &MAY; send
372<figure><artwork type="example">
373  Accept-Ranges: none
376   to advise the client not to attempt a range request.
382<section title="Range Requests" anchor="range.requests">
[2142]383<section title="Range" anchor="header.range">
384  <iref primary="true" item="Range header field" x:for-anchor=""/>
385  <x:anchor-alias value="Range"/>
386  <x:anchor-alias value="other-ranges-specifier"/>
387  <x:anchor-alias value="other-range-set"/>
389   The "Range" header field on a GET request modifies the method semantics to
[2150]390   request transfer of only one or more subranges of the selected
391   representation data, rather than the entire selected representation data.
393<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Range"/>
394  <x:ref>Range</x:ref> = <x:ref>byte-ranges-specifier</x:ref> / <x:ref>other-ranges-specifier</x:ref>
395  <x:ref>other-ranges-specifier</x:ref> = <x:ref>other-range-unit</x:ref> "=" <x:ref>other-range-set</x:ref>
[2507]396  <x:ref>other-range-set</x:ref> = 1*<x:ref>VCHAR</x:ref>
399   A server &MAY; ignore the Range header field. However, origin servers and
400   intermediate caches ought to support byte ranges when possible, since Range
401   supports efficient recovery from partially failed transfers and partial
402   retrieval of large representations. A server &MUST; ignore a Range header
403   field received with a request method other than GET.
[2150]406   An origin server &MUST; ignore a Range header field that contains a range
[2363]407   unit it does not understand. A proxy &MAY; discard a Range header
408   field that contains a range unit it does not understand.
[2363]411   A server that supports range requests &MAY; ignore or reject a
[2157]412   <x:ref>Range</x:ref> header field that consists of more than two
413   overlapping ranges, or a set of many small ranges that are not listed
414   in ascending order, since both are indications of either a broken client or
[2643]415   a deliberate denial-of-service attack (<xref target="overlapping.ranges"/>).
[2157]416   A client &SHOULD-NOT; request multiple ranges that are inherently less
417   efficient to process and transfer than a single range that encompasses the
418   same data.
421   A client that is requesting multiple ranges &SHOULD; list those ranges in
422   ascending order (the order in which they would typically be received in a
423   complete representation) unless there is a specific need to request a later
424   part earlier. For example, a user agent processing a large representation
425   with an internal catalog of parts might need to request later parts first,
426   particularly if the representation consists of pages stored in reverse
427   order and the user agent wishes to transfer one page at a time.
[2299]430   The Range header field is evaluated after evaluating the precondition header
[2629]431   fields defined in <xref target="RFC7232"/>, and only if the result in absence
[2299]432   of the Range header field would be a <x:ref>200 (OK)</x:ref> response. In
433   other words, Range is ignored when a conditional GET would result in a
[2142]434   <x:ref>304 (Not Modified)</x:ref> response.
437   The If-Range header field (<xref target="header.if-range"/>) can be used as
438   a precondition to applying the Range header field.
441   If all of the preconditions are true, the server supports the Range header
[2150]442   field for the target resource, and the specified range(s) are valid and
443   satisfiable (as defined in <xref target="byte.ranges"/>), the
444   server &SHOULD; send a <x:ref>206 (Partial Content)</x:ref> response with a
445   payload containing one or more partial representations that correspond to
446   the satisfiable ranges requested, as defined in
[2142]447   <xref target="range.response"/>.
450   If all of the preconditions are true, the server supports the Range header
451   field for the target resource, and the specified range(s) are invalid or
452   unsatisfiable, the server &SHOULD; send a
453   <x:ref>416 (Range Not Satisfiable)</x:ref> response.
[2142]457<section title="If-Range" anchor="header.if-range">
458  <iref primary="true" item="If-Range header field" x:for-anchor=""/>
459  <x:anchor-alias value="If-Range"/>
461   If a client has a partial copy of a representation and wishes
462   to have an up-to-date copy of the entire representation, it could use the
463   <x:ref>Range</x:ref> header field with a conditional GET (using
464   either or both of <x:ref>If-Unmodified-Since</x:ref> and
[2377]465   <x:ref>If-Match</x:ref>.) However, if the precondition fails because the
[2142]466   representation has been modified, the client would then have to make a
467   second request to obtain the entire current representation.
470   The "If-Range" header field allows a client to "short-circuit" the second
[2687]471   request. Informally, its meaning is as follows: if the representation is unchanged,
[2142]472   send me the part(s) that I am requesting in Range; otherwise, send me the
473   entire representation.
475<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Range"/>
476  <x:ref>If-Range</x:ref> = <x:ref>entity-tag</x:ref> / <x:ref>HTTP-date</x:ref>
[2150]479   A client &MUST-NOT; generate an If-Range header field in a request that
480   does not contain a <x:ref>Range</x:ref> header field.
481   A server &MUST; ignore an If-Range header field received in a request that
482   does not contain a <x:ref>Range</x:ref> header field.
483   An origin server &MUST; ignore an If-Range header field received in a
484   request for a target resource that does not support Range requests.
[2377]487   A client &MUST-NOT; generate an If-Range header field containing an
488   entity-tag that is marked as weak.
489   A client &MUST-NOT; generate an If-Range header field containing an
490   <x:ref>HTTP-date</x:ref> unless the client has no entity-tag for
491   the corresponding representation and the date is a strong validator
492   in the sense defined by &lastmod-comparison;.
495   A server that evaluates an If-Range precondition &MUST; use the strong
496   comparison function when comparing entity-tags (&entity-tag-comparison;)
497   and &MUST; evaluate the condition as false if an <x:ref>HTTP-date</x:ref>
498   validator is provided that is not a strong validator in the sense defined
499   by &lastmod-comparison;.
[2560]500   A valid <x:ref>entity-tag</x:ref> can be distinguished from a valid
501   <x:ref>HTTP-date</x:ref> by examining the first two characters for a
502   DQUOTE.
[2142]505   If the validator given in the If-Range header field matches the current
506   validator for the selected representation of the target resource, then
[2377]507   the server &SHOULD; process the <x:ref>Range</x:ref> header field as
508   requested. If the validator does not match, the server &MUST; ignore the
[2559]509   <x:ref>Range</x:ref> header field. Note that this comparison by exact
510   match, including when the validator is an <x:ref>HTTP-date</x:ref>, differs
511   from the "earlier than or equal to" comparison used when evaluating an
512   <x:ref>If-Unmodified-Since</x:ref> conditional.
[2143]518<section title="Responses to a Range Request" anchor="range.response">
520<section title="206 Partial Content" anchor="status.206">
521  <iref primary="true" item="206 Partial Content (status code)" x:for-anchor=""/>
522  <x:anchor-alias value="206"/>
523  <x:anchor-alias value="206 (Partial Content)"/>
[2152]525   The <x:dfn>206 (Partial Content)</x:dfn> status code indicates that the
[2153]526   server is successfully fulfilling a range request for the target resource
527   by transferring one or more parts of the selected representation that
[2196]528   correspond to the satisfiable ranges found in the request's
[2153]529   <x:ref>Range</x:ref> header field (<xref target="header.range"/>).
[2153]532   If a single part is being transferred, the server generating the 206
533   response &MUST; generate a <x:ref>Content-Range</x:ref> header field,
534   describing what range of the selected representation is enclosed, and a
535   payload consisting of the range. For example:
537<figure><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
538HTTP/1.1 206 Partial Content
539Date: Wed, 15 Nov 1995 06:25:24 GMT
540Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
541Content-Range: bytes 21010-47021/47022
542Content-Length: 26012
543Content-Type: image/gif
[2157]545... 26012 bytes of partial image data ...
[2153]548   If multiple parts are being transferred, the server generating the 206
549   response &MUST; generate a "multipart/byteranges" payload, as defined
[2158]550   in <xref target=""/>, and a
[2153]551   <x:ref>Content-Type</x:ref> header field containing the
[2157]552   multipart/byteranges media type and its required boundary parameter.
[2687]553   To avoid confusion with single-part responses, a server &MUST-NOT; generate
[2401]554   a <x:ref>Content-Range</x:ref> header field in the HTTP header section of a
[2158]555   multiple part response (this field will be sent in each part instead).
[2157]558   Within the header area of each body part in the multipart payload, the
559   server &MUST; generate a <x:ref>Content-Range</x:ref> header field
560   corresponding to the range being enclosed in that body part.
561   If the selected representation would have had a <x:ref>Content-Type</x:ref>
562   header field in a <x:ref>200 (OK)</x:ref> response, the server &SHOULD;
563   generate that same <x:ref>Content-Type</x:ref> field in the header area of
564   each body part. For example:
[2157]566<figure><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
[2153]567HTTP/1.1 206 Partial Content
568Date: Wed, 15 Nov 1995 06:25:24 GMT
569Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
570Content-Length: 1741
571Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
574Content-Type: application/pdf
575Content-Range: bytes 500-999/8000
577...the first range...
579Content-Type: application/pdf
580Content-Range: bytes 7000-7999/8000
582...the second range
[2157]586   When multiple ranges are requested, a server &MAY; coalesce any of the
[2476]587   ranges that overlap, or that are separated by a gap that is smaller than the
[2157]588   overhead of sending multiple parts, regardless of the order in which the
589   corresponding byte-range-spec appeared in the received <x:ref>Range</x:ref>
590   header field. Since the typical overhead between parts of a
591   multipart/byteranges payload is around 80 bytes, depending on the selected
592   representation's media type and the chosen boundary parameter length, it
593   can be less efficient to transfer many small disjoint parts than it is to
594   transfer the entire selected representation.
[2157]597   A server &MUST-NOT; generate a multipart response to a request for a single
598   range, since a client that does not request multiple parts might not
599   support multipart responses. However, a server &MAY; generate a
600   multipart/byteranges payload with only a single body part if multiple
601   ranges were requested and only one range was found to be satisfiable or
602   only one range remained after coalescing.
[2290]603   A client that cannot process a multipart/byteranges response &MUST-NOT;
[2292]604   generate a request that asks for multiple ranges.
[2157]607   When a multipart response payload is generated, the server &SHOULD; send
608   the parts in the same order that the corresponding byte-range-spec appeared
609   in the received <x:ref>Range</x:ref> header field, excluding those ranges
610   that were deemed unsatisfiable or that were coalesced into other ranges.
611   A client that receives a multipart response &MUST; inspect the
612   <x:ref>Content-Range</x:ref> header field present in each body part in
613   order to determine which range is contained in that body part; a client
614   cannot rely on receiving the same ranges that it requested, nor the same
615   order that it requested.
[2157]618   When a 206 response is generated, the server &MUST; generate the following
[2158]619   header fields, in addition to those required above, if the field would
[2157]620   have been sent in a <x:ref>200 (OK)</x:ref> response to the same request:
621   <x:ref>Date</x:ref>, <x:ref>Cache-Control</x:ref>, <x:ref>ETag</x:ref>,
622   <x:ref>Expires</x:ref>, <x:ref>Content-Location</x:ref>, and
623   <x:ref>Vary</x:ref>.
[2066]626   If a 206 is generated in response to a request with an <x:ref>If-Range</x:ref>
627   header field, the sender &SHOULD-NOT; generate other representation header
[2158]628   fields beyond those required above, because the client is understood to
[2157]629   already have a prior response containing those header fields.
630   Otherwise, the sender &MUST; generate all of the representation header
[2066]631   fields that would have been sent in a <x:ref>200 (OK)</x:ref> response
[1738]632   to the same request.
[2487]635   A 206 response is cacheable by default; i.e., unless otherwise indicated by
[2166]636   explicit cache controls (see &p6-heuristic;).
640<section title="Content-Range" anchor="header.content-range">
[1120]641  <iref primary="true" item="Content-Range header field" x:for-anchor=""/>
[229]642  <x:anchor-alias value="Content-Range"/>
[2135]643  <x:anchor-alias value="byte-content-range"/>
644  <x:anchor-alias value="byte-range-resp"/>
645  <x:anchor-alias value="byte-range"/>
646  <x:anchor-alias value="unsatisfied-range"/>
647  <x:anchor-alias value="complete-length"/>
648  <x:anchor-alias value="other-content-range"/>
649  <x:anchor-alias value="other-range-resp"/>
[2158]651   The "Content-Range" header field is sent in a single part
652   <x:ref>206 (Partial Content)</x:ref> response to indicate the partial range
653   of the selected representation enclosed as the message payload, sent in
654   each part of a multipart 206 response to indicate the range enclosed within
655   each body part, and sent in <x:ref>416 (Range Not Satisfiable)</x:ref>
656   responses to provide information about the selected representation.
[2135]658<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Range"/><iref primary="true" item="Grammar" subitem="byte-content-range"/><iref primary="true" item="Grammar" subitem="byte-range-resp"/><iref primary="true" item="Grammar" subitem="byte-range"/><iref primary="true" item="Grammar" subitem="unsatisfied-range"/><iref primary="true" item="Grammar" subitem="other-content-range"/><iref primary="true" item="Grammar" subitem="other-range-resp"/><iref primary="true" item="Grammar" subitem="complete-length"/>
659  <x:ref>Content-Range</x:ref>       = <x:ref>byte-content-range</x:ref>
660                      / <x:ref>other-content-range</x:ref>
[2135]662  <x:ref>byte-content-range</x:ref>  = <x:ref>bytes-unit</x:ref> <x:ref>SP</x:ref>
[2138]663                        ( <x:ref>byte-range-resp</x:ref> / <x:ref>unsatisfied-range</x:ref> )
665  <x:ref>byte-range-resp</x:ref>     = <x:ref>byte-range</x:ref> "/" ( <x:ref>complete-length</x:ref> / "*" )
666  <x:ref>byte-range</x:ref>          = <x:ref>first-byte-pos</x:ref> "-" <x:ref>last-byte-pos</x:ref>
667  <x:ref>unsatisfied-range</x:ref>   = "*/" <x:ref>complete-length</x:ref>
[2135]669  <x:ref>complete-length</x:ref>     = 1*<x:ref>DIGIT</x:ref>
[2135]671  <x:ref>other-content-range</x:ref> = <x:ref>other-range-unit</x:ref> <x:ref>SP</x:ref> <x:ref>other-range-resp</x:ref>
672  <x:ref>other-range-resp</x:ref>    = *<x:ref>CHAR</x:ref>
[2158]675   If a <x:ref>206 (Partial Content)</x:ref> response contains a
[2135]676   <x:ref>Content-Range</x:ref> header field with a <x:ref>range unit</x:ref>
[2158]677   (<xref target="range.units"/>) that the recipient does not understand, the
678   recipient &MUST-NOT; attempt to recombine it with a stored representation.
679   A proxy that receives such a message &SHOULD; forward it downstream.
[2135]682   For byte ranges, a sender &SHOULD; indicate the complete length of the
[2158]683   representation from which the range has been extracted, unless the complete
[2135]684   length is unknown or difficult to determine. An asterisk character ("*") in
685   place of the complete-length indicates that the representation length was
686   unknown when the header field was generated.
[2158]689   The following example illustrates when the complete length of the selected
690   representation is known by the sender to be 1234 bytes:
[2135]692<figure><artwork type="example">
693  Content-Range: bytes 42-1233/1234
[2158]696   and this second example illustrates when the complete length is unknown:
[2135]698<figure><artwork type="example">
699  Content-Range: bytes 42-1233/*
[2158]702   A Content-Range field value is invalid if it contains a
703   <x:ref>byte-range-resp</x:ref> that has a <x:ref>last-byte-pos</x:ref>
704   value less than its <x:ref>first-byte-pos</x:ref> value, or a
705   <x:ref>complete-length</x:ref> value less than or equal to its
706   <x:ref>last-byte-pos</x:ref> value. The recipient of an invalid
707   <x:ref>Content-Range</x:ref> &MUST-NOT; attempt to recombine the received
708   content with a stored representation.
[2135]711   A server generating a <x:ref>416 (Range Not Satisfiable)</x:ref> response
[2687]712   to a byte-range request &SHOULD; send a Content-Range header field with an
[2135]713   <x:ref>unsatisfied-range</x:ref> value, as in the following example:
[2135]715<figure><artwork type="example">
716  Content-Range: bytes */1234
[2135]719   The complete-length in a 416 response indicates the current length of the
[2158]720   selected representation.
[2688]723   The Content-Range header field has no meaning for status codes that do
[2135]724   not explicitly describe its semantic. For this specification, only the
725   <x:ref>206 (Partial Content)</x:ref> and
726   <x:ref>416 (Range Not Satisfiable)</x:ref> status codes describe a meaning
727   for Content-Range.
[2158]730   The following are examples of Content-Range values in which the
731   selected representation contains a total of 1234 bytes:
[8]732   <list style="symbols">
733      <t>
734        The first 500 bytes:
[565]735<figure><artwork type="example" x:indent-with="   ">
[2135]736  Content-Range: bytes 0-499/1234
738      </t>   
739      <t>
740        The second 500 bytes:
[565]741<figure><artwork type="example" x:indent-with="   ">
[2135]742  Content-Range: bytes 500-999/1234
744      </t>   
745      <t>
746        All except for the first 500 bytes:
[565]747<figure><artwork type="example" x:indent-with="   ">
[2135]748  Content-Range: bytes 500-1233/1234
750      </t>   
751      <t>
752        The last 500 bytes:
[565]753<figure><artwork type="example" x:indent-with="   ">
[2135]754  Content-Range: bytes 734-1233/1234
756      </t>   
757   </list>
[2142]761<section title="Combining Ranges" anchor="combining.byte.ranges">
[2142]763   A response might transfer only a subrange of a representation if the
764   connection closed prematurely or if the request used one or more Range
765   specifications.  After several such transfers, a client might have
766   received several ranges of the same representation.  These ranges can only
[2377]767   be safely combined if they all have in common the same strong validator
768   (&weak-and-strong-validators;).
[2158]771   A client that has received multiple partial responses to GET requests on a
772   target resource &MAY; combine those responses into a larger continuous
773   range if they share the same strong validator.
[2158]776   If the most recent response is an incomplete <x:ref>200 (OK)</x:ref>
777   response, then the header fields of that response are used for any
778   combined response and replace those of the matching stored responses.
[2158]781   If the most recent response is a <x:ref>206 (Partial Content)</x:ref>
782   response and at least one of the matching stored responses is a
783   <x:ref>200 (OK)</x:ref>, then the combined response header fields consist
784   of the most recent 200 response's header fields. If all of the matching
785   stored responses are 206 responses, then the stored response with the most
786   recent header fields is used as the source of header fields for the
787   combined response, except that the client &MUST; use other header fields
788   provided in the new response, aside from <x:ref>Content-Range</x:ref>, to
789   replace all instances of the corresponding header fields in the stored
790   response.
[2142]793   The combined response message body consists of the union of partial
794   content ranges in the new response and each of the selected responses.
795   If the union consists of the entire range of the representation, then the
[2297]796   client &MUST; process the combined response as if it were a complete
[2142]797   <x:ref>200 (OK)</x:ref> response, including a <x:ref>Content-Length</x:ref>
798   header field that reflects the complete length.
[2297]799   Otherwise, the client &MUST; process the set of continuous ranges as one of
[2142]800   the following:
801   an incomplete <x:ref>200 (OK)</x:ref> response if the combined response is
802   a prefix of the representation,
803   a single <x:ref>206 (Partial Content)</x:ref> response containing a
804   multipart/byteranges body, or
805   multiple <x:ref>206 (Partial Content)</x:ref> responses, each with one
806   continuous range that is indicated by a <x:ref>Content-Range</x:ref> header
807   field.
811<section title="416 Range Not Satisfiable" anchor="status.416">
812  <iref primary="true" item="416 Range Not Satisfiable (status code)" x:for-anchor=""/>
813  <x:anchor-alias value="416 (Range Not Satisfiable)"/>
[2158]815   The <x:dfn>416 (Range Not Satisfiable)</x:dfn> status code indicates that
816   none of the ranges in the request's <x:ref>Range</x:ref> header field
817   (<xref target="header.range"/>) overlap the current extent of the selected
818   resource or that the set of ranges requested has been rejected due to
819   invalid ranges or an excessive request of small or overlapping ranges.
[2158]822   For byte ranges, failing to overlap the current extent means that the
823   <x:ref>first-byte-pos</x:ref> of all of the <x:ref>byte-range-spec</x:ref>
824   values were greater than the current length of the selected representation.
[2687]825   When this status code is generated in response to a byte-range request, the
[2152]826   sender &SHOULD; generate a <x:ref>Content-Range</x:ref> header field
827   specifying the current length of the selected representation
[2158]828   (<xref target="header.content-range"/>).
831<preamble>For example:</preamble>
832<artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
833HTTP/1.1 416 Range Not Satisfiable
[2207]834Date: Fri, 20 Jan 2012 15:41:54 GMT
[2152]835Content-Range: bytes */47022
838  <t>
[2158]839    &Note; Because servers are free to ignore <x:ref>Range</x:ref>, many
[2217]840    implementations will simply respond with the entire selected representation
[2297]841    in a <x:ref>200 (OK)</x:ref> response. That is partly because
[2158]842    most clients are prepared to receive a <x:ref>200 (OK)</x:ref> to
843    complete the task (albeit less efficiently) and partly because clients
844    might not stop making an invalid partial request until they have received
845    a complete representation. Thus, clients cannot depend on receiving a
846    <x:ref>416 (Range Not Satisfiable)</x:ref> response even when it is most
847    appropriate.
[2152]848  </t>
[29]853<section title="IANA Considerations" anchor="IANA.considerations">
[2139]855<section title="Range Unit Registry" anchor="range.unit.registry">
[2687]857   The "HTTP Range Unit Registry" defines the namespace for the range
[2139]858   unit names and refers to their corresponding specifications.
[2688]859   The registry has been created and is now maintained at
[2151]860   <eref target=""/>.
863<section title="Procedure" anchor="range.unit.registry.procedure">
865   Registration of an HTTP Range Unit &MUST; include the following fields:
866   <list style="symbols">
867     <t>Name</t>
868     <t>Description</t>
869     <t>Pointer to specification text</t>
870   </list>
[2651]873  Values to be added to this namespace require IETF Review
[2139]874  (see <xref target="RFC5226" x:fmt="," x:sec="4.1"/>).
878<section title="Registrations" anchor="range.unit.registration">
[2687]880   The initial range unit registry contains the registrations
[2139]881   below:
883<texttable align="left" suppress-title="true" anchor="iana.range.units.table">
[2153]884   <ttcol>Range Unit Name</ttcol>
[2139]885   <ttcol>Description</ttcol>
886   <ttcol>Reference</ttcol>
888   <c>bytes</c>
889   <c>a range of octets</c>
[2144]890   <c><xref target="byte.ranges"/></c>
892   <c>none</c>
893   <c>reserved as keyword, indicating no ranges are supported</c>
894   <c><xref target="header.accept-ranges"/></c>
897   The change controller is: "IETF ( - Internet Engineering Task Force".
[700]902<section title="Status Code Registration" anchor="status.code.registration">
[2659]904   The "Hypertext Transfer Protocol (HTTP) Status Code Registry" located at <eref target=""/>
[2687]905   has been updated to include the registrations below:
907<?BEGININC p5-range.iana-status-codes ?>
908<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
909<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
910   <ttcol>Value</ttcol>
911   <ttcol>Description</ttcol>
912   <ttcol>Reference</ttcol>
913   <c>206</c>
914   <c>Partial Content</c>
915   <c>
916      <xref target="status.206"/>
917   </c>
918   <c>416</c>
[2121]919   <c>Range Not Satisfiable</c>
[700]920   <c>
921      <xref target="status.416"/>
922   </c>
925<?ENDINC p5-range.iana-status-codes ?>
[921]928<section title="Header Field Registration" anchor="header.field.registration">
[2659]930   HTTP header fields are registered within the "Message Headers" registry
[2246]931   maintained at
[2687]932   <eref target=""/>.
[2659]935   This document defines the following HTTP header fields, so the
936   "Permanent Message Header Field Names" registry has been updated
937   accordingly (see <xref target="BCP90"/>).
[680]939<?BEGININC p5-range.iana-headers ?>
[253]940<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
[290]941<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
[253]942   <ttcol>Header Field Name</ttcol>
943   <ttcol>Protocol</ttcol>
944   <ttcol>Status</ttcol>
945   <ttcol>Reference</ttcol>
947   <c>Accept-Ranges</c>
948   <c>http</c>
949   <c>standard</c>
950   <c>
951      <xref target="header.accept-ranges"/>
952   </c>
953   <c>Content-Range</c>
954   <c>http</c>
955   <c>standard</c>
956   <c>
957      <xref target="header.content-range"/>
958   </c>
959   <c>If-Range</c>
960   <c>http</c>
961   <c>standard</c>
962   <c>
963      <xref target="header.if-range"/>
964   </c>
965   <c>Range</c>
966   <c>http</c>
967   <c>standard</c>
968   <c>
969      <xref target="header.range"/>
970   </c>
[680]973<?ENDINC p5-range.iana-headers ?>
[290]975   The change controller is: "IETF ( - Internet Engineering Task Force".
[2441]979<section title="Internet Media Type Registration" anchor="">
981   IANA maintains the registry of Internet media types <xref target="BCP13"/> at
982   <eref target=""/>.
985   This document serves as the specification for the Internet media type
[2687]986   "multipart/byteranges". The following has been registered with
[2441]987   IANA.
989<section title="Internet Media Type multipart/byteranges" anchor="">
990<iref item="Media Type" subitem="multipart/byteranges" primary="true"/>
991<iref item="multipart/byteranges Media Type" primary="true"/>
993  <list style="hanging" x:indent="12em">
994    <t hangText="Type name:">
995      multipart
996    </t>
997    <t hangText="Subtype name:">
998      byteranges
999    </t>
1000    <t hangText="Required parameters:">
1001      boundary
1002    </t>
1003    <t hangText="Optional parameters:">
[2505]1004      N/A
[2441]1005    </t>
1006    <t hangText="Encoding considerations:">
1007      only "7bit", "8bit", or "binary" are permitted
1008    </t>
1009    <t hangText="Security considerations:">
[2505]1010      see <xref target="security.considerations"/>
[2441]1011    </t>
1012    <t hangText="Interoperability considerations:">
[2505]1013      N/A
[2441]1014    </t>
1015    <t hangText="Published specification:">
1016      This specification (see <xref target=""/>).
1017    </t>
1018    <t hangText="Applications that use this media type:">
1019      HTTP components supporting multiple ranges in a single request.
1020    </t>
[2505]1021    <t hangText="Fragment identifier considerations:">
1022      N/A
1023    </t>
[2441]1024    <t hangText="Additional information:">
1025      <list style="hanging">
[2505]1026        <t hangText="Deprecated alias names for this type:">N/A</t>
1027        <t hangText="Magic number(s):">N/A</t>
1028        <t hangText="File extension(s):">N/A</t>
1029        <t hangText="Macintosh file type code(s):">N/A</t>
[2441]1030      </list>
1031    </t>
1032    <t hangText="Person and email address to contact for further information:">
[2638]1033      See Authors' Addresses Section.
[2441]1034    </t>
1035    <t hangText="Intended usage:">
1036      COMMON
1037    </t>
1038    <t hangText="Restrictions on usage:">
[2505]1039      N/A
[2441]1040    </t>
1041    <t hangText="Author:">
[2638]1042      See Authors' Addresses Section.
[2441]1043    </t>
1044    <t hangText="Change controller:">
1045      IESG
1046    </t>
1047  </list>
[8]1054<section title="Security Considerations" anchor="security.considerations">
[2069]1056   This section is meant to inform developers, information providers, and
[2569]1057   users of known security concerns specific to the HTTP range
[2069]1058   request mechanisms. More general security considerations are addressed
1059   in HTTP messaging &messaging; and semantics &semantics;.
[2688]1062<section title="Denial-of-Service Attacks Using Range" anchor="overlapping.ranges">
[2643]1064   Unconstrained multiple range requests are susceptible to denial-of-service
[2157]1065   attacks because the effort required to request many overlapping ranges of
1066   the same data is tiny compared to the time, memory, and bandwidth consumed
1067   by attempting to serve the requested data in many parts.
1068   Servers ought to ignore, coalesce, or reject egregious range requests, such
1069   as requests for more than two overlapping ranges or for many small ranges
1070   in a single set, particularly when the ranges are requested out of order
1071   for no apparent reason. Multipart range requests are not designed to
1072   support random access.
[1364]1077<section title="Acknowledgments" anchor="acks">
[1364]1079  See &acks;.
[119]1085<references title="Normative References">
[2629]1087<reference anchor="RFC7230">
[119]1088  <front>
[1864]1089    <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
[119]1090    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]1091      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]1092      <address><email></email></address>
1093    </author>
1094    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1095      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1096      <address><email></email></address>
1097    </author>
1098    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1099  </front>
1100  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
[1740]1101  <x:source href="p1-messaging.xml" basename="p1-messaging">
1102    <x:defines>Content-Length</x:defines>
1103  </x:source>
[2629]1106<reference anchor="RFC7231">
[1436]1107  <front>
[1864]1108    <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
[1436]1109    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1110      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1111      <address><email></email></address>
1112    </author>
1113    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1114      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1115      <address><email></email></address>
1116    </author>
1117    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1118  </front>
1119  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
[1715]1120  <x:source href="p2-semantics.xml" basename="p2-semantics">
1121    <x:defines>200 (OK)</x:defines>
[1735]1122    <x:defines>410 (Gone)</x:defines>
[1740]1123    <x:defines>Content-Location</x:defines>
1124    <x:defines>Content-Type</x:defines>
[2152]1125    <x:defines>Date</x:defines>
[1740]1126    <x:defines>Location</x:defines>
[1860]1127    <x:defines>Vary</x:defines>
[1715]1128  </x:source>
[2629]1131<reference anchor="RFC7232">
[119]1132  <front>
[1864]1133    <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
[119]1134    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
[1106]1135      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[119]1136      <address><email></email></address>
1137    </author>
1138    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1139      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1140      <address><email></email></address>
1141    </author>
1142    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1143  </front>
1144  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/>
[1734]1145  <x:source href="p4-conditional.xml" basename="p4-conditional">
1146    <x:defines>304 (Not Modified)</x:defines>
[1739]1147    <x:defines>ETag</x:defines>
1148    <x:defines>If-Match</x:defines>
1149    <x:defines>If-Modified-Since</x:defines>
1150    <x:defines>If-None-Match</x:defines>
1151    <x:defines>If-Unmodified-Since</x:defines>
1152    <x:defines>Last-Modified</x:defines>
[1734]1153  </x:source>
[2629]1156<reference anchor="RFC7234">
[1524]1157  <front>
[1864]1158    <title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
[1524]1159    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1160      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1161      <address><email></email></address>
1162    </author>
1163    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
[1915]1164      <organization>Akamai</organization>
[1524]1165      <address><email></email></address>
1166    </author>
1167    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1168      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1169      <address><email></email></address>
1170    </author>
1171    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1172  </front>
1173  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
[1737]1174  <x:source href="p6-cache.xml" basename="p6-cache">
[1739]1175    <x:defines>Cache-Control</x:defines>
[1737]1176    <x:defines>Expires</x:defines>
1177  </x:source>
[131]1180<reference anchor="RFC2046">
1181  <front>
1182    <title abbrev="Media Types">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</title>
1183    <author initials="N." surname="Freed" fullname="Ned Freed">
1184      <organization>Innosoft International, Inc.</organization>
1185      <address><email></email></address>
1186    </author>
1187    <author initials="N." surname="Borenstein" fullname="Nathaniel S. Borenstein">
1188      <organization>First Virtual Holdings</organization>
1189      <address><email></email></address>
1190    </author>
1191    <date month="November" year="1996"/>
1192  </front>
1193  <seriesInfo name="RFC" value="2046"/>
[119]1196<reference anchor="RFC2119">
1197  <front>
1198    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1199    <author initials="S." surname="Bradner" fullname="Scott Bradner">
1200      <organization>Harvard University</organization>
1201      <address><email></email></address>
1202    </author>
1203    <date month="March" year="1997"/>
1204  </front>
1205  <seriesInfo name="BCP" value="14"/>
1206  <seriesInfo name="RFC" value="2119"/>
[425]1209<reference anchor="RFC5234">
1210  <front>
1211    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
1212    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
1213      <organization>Brandenburg InternetWorking</organization>
1214      <address>
[728]1215        <email></email>
1216      </address> 
[425]1217    </author>
1218    <author initials="P." surname="Overell" fullname="Paul Overell">
1219      <organization>THUS plc.</organization>
1220      <address>
[728]1221        <email></email>
1222      </address>
[425]1223    </author>
1224    <date month="January" year="2008"/>
1225  </front>
1226  <seriesInfo name="STD" value="68"/>
1227  <seriesInfo name="RFC" value="5234"/>
1232<references title="Informative References">
[36]1234<reference anchor="RFC2616">
[119]1235  <front>
1236    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1237    <author initials="R." surname="Fielding" fullname="R. Fielding">
1238      <organization>University of California, Irvine</organization>
1239      <address><email></email></address>
1240    </author>
1241    <author initials="J." surname="Gettys" fullname="J. Gettys">
1242      <organization>W3C</organization>
1243      <address><email></email></address>
1244    </author>
1245    <author initials="J." surname="Mogul" fullname="J. Mogul">
1246      <organization>Compaq Computer Corporation</organization>
1247      <address><email></email></address>
1248    </author>
1249    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
1250      <organization>MIT Laboratory for Computer Science</organization>
1251      <address><email></email></address>
1252    </author>
1253    <author initials="L." surname="Masinter" fullname="L. Masinter">
1254      <organization>Xerox Corporation</organization>
1255      <address><email></email></address>
1256    </author>
1257    <author initials="P." surname="Leach" fullname="P. Leach">
1258      <organization>Microsoft Corporation</organization>
1259      <address><email></email></address>
1260    </author>
1261    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
1262      <organization>W3C</organization>
1263      <address><email></email></address>
1264    </author>
1265    <date month="June" year="1999"/>
1266  </front>
1267  <seriesInfo name="RFC" value="2616"/>
[2046]1270<reference anchor='BCP90'>
[253]1271  <front>
1272    <title>Registration Procedures for Message Header Fields</title>
1273    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
1274      <organization>Nine by Nine</organization>
1275      <address><email></email></address>
1276    </author>
1277    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
1278      <organization>BEA Systems</organization>
1279      <address><email></email></address>
1280    </author>
1281    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
1282      <organization>HP Labs</organization>
1283      <address><email></email></address>
1284    </author>
1285    <date year='2004' month='September' />
1286  </front>
1287  <seriesInfo name='BCP' value='90' />
1288  <seriesInfo name='RFC' value='3864' />
[2046]1291<reference anchor="BCP13">
[196]1292  <front>
1293    <title>Media Type Specifications and Registration Procedures</title>
[2170]1294    <author initials="N." surname="Freed" fullname="Ned Freed">
1295      <organization>Oracle</organization>
[196]1296      <address>
[2170]1297        <email></email>
[196]1298      </address>
1299    </author>
[2170]1300    <author initials="J." surname="Klensin" fullname="John C. Klensin">
[196]1301      <address>
[2170]1302        <email></email>
[196]1303      </address>
1304    </author>
[2170]1305    <author initials="T." surname="Hansen" fullname="Tony Hansen">
1306      <organization>AT&amp;T Laboratories</organization>
1307      <address>
1308        <email></email>
1309      </address>
1310    </author>
1311    <date year="2013" month="January"/>
[196]1312  </front>
1313  <seriesInfo name="BCP" value="13"/>
[2170]1314  <seriesInfo name="RFC" value="6838"/>
[930]1317<reference anchor='RFC5226'>
1318  <front>
1319    <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
1320    <author initials='T.' surname='Narten' fullname='T. Narten'>
1321      <organization>IBM</organization>
1322      <address><email></email></address>
1323    </author>
1324    <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
1325      <organization>Google</organization>
1326      <address><email></email></address>
1327    </author>
1328    <date year='2008' month='May' />
1329  </front>
1330  <seriesInfo name='BCP' value='26' />
1331  <seriesInfo name='RFC' value='5226' />
[8]1336<section title="Internet Media Type multipart/byteranges" anchor="">
1337<iref item="Media Type" subitem="multipart/byteranges" primary="true"/>
1338<iref item="multipart/byteranges Media Type" primary="true"/>
[2153]1340   When a <x:ref>206 (Partial Content)</x:ref> response message includes the
[2157]1341   content of multiple ranges, they are transmitted as body parts in a
[2153]1342   multipart message body (<xref target="RFC2046" x:fmt="," x:sec="5.1"/>)
[2441]1343   with the media type of "multipart/byteranges".
[2157]1346   The multipart/byteranges media type includes one or more body parts, each
[1740]1347   with its own <x:ref>Content-Type</x:ref> and <x:ref>Content-Range</x:ref>
1348   fields. The required boundary parameter specifies the boundary string used
[2157]1349   to separate each body part.
[2153]1352  Implementation Notes:
[8]1353  <list style="numbers">
[2153]1354      <t>Additional CRLFs might precede the first boundary string in the body.</t>
[97]1356      <t>Although <xref target="RFC2046"/> permits the boundary string to be
[8]1357         quoted, some existing implementations handle a quoted boundary
1358         string incorrectly.</t>
[1600]1360      <t>A number of clients and servers were coded to an early draft
[2153]1361         of the byteranges specification that used a media type of
1362         multipart/x-byteranges<iref item="multipart/x-byteranges Media Type"/><iref item="Media Type" subitem="multipart/x-byteranges"/>,
1363         which is almost (but not quite) compatible with this type.</t>
[8]1364  </list>
1367   Despite the name, the "multipart/byteranges" media type is not limited to
1368   byte ranges. The following example uses an "exampleunit" range unit:
1370<figure><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
1371HTTP/1.1 206 Partial Content
1372Date: Tue, 14 Nov 1995 06:25:24 GMT
1373Last-Modified: Tue, 14 July 04:58:08 GMT
1374Content-Length: 2331785
1375Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
1378Content-Type: video/example
1379Content-Range: exampleunit 1.2-4.3/25
1381...the first range...
1383Content-Type: video/example
1384Content-Range: exampleunit 11.2-14.3/25
1386...the second range
[99]1392<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
[2369]1394  Servers are given more leeway in how they respond to a range request,
1395  in order to mitigate abuse by malicious (or just greedy) clients.
1396  (<xref target="header.range"/>)
[2015]1399  A weak validator cannot be used in a <x:ref>206</x:ref> response.
[105]1400  (<xref target="status.206"/>)
[2021]1403  The Content-Range header field only has meaning when the status code
1404  explicitly defines its use.
1405  (<xref target="header.content-range" />)
[2369]1408  This specification introduces a Range Unit Registry.
1409  (<xref target="range.unit.registry"/>)
[2015]1412  multipart/byteranges can consist of a single part.
[332]1413  (<xref target=""/>)
[1805]1417<section title="Imported ABNF" anchor="imported.abnf">
1418  <x:anchor-alias value="ALPHA"/>
1419  <x:anchor-alias value="CHAR"/>
1420  <x:anchor-alias value="CR"/>
1421  <x:anchor-alias value="DIGIT"/>
1422  <x:anchor-alias value="LF"/>
1423  <x:anchor-alias value="OCTET"/>
1424  <x:anchor-alias value="SP"/>
1425  <x:anchor-alias value="VCHAR"/>
1426  <x:anchor-alias value="token"/>
1427  <x:anchor-alias value="OWS"/>
1428  <x:anchor-alias value="HTTP-date"/>
1429  <x:anchor-alias value="entity-tag"/>
1431  The following core rules are included by
[1806]1432  reference, as defined in <xref target="RFC5234" x:fmt="of" x:sec="B.1"/>:
[1805]1433  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
1434  DIGIT (decimal 0-9), DQUOTE (double quote),
1435  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
1436  OCTET (any 8-bit sequence of data), SP (space), and
1437  VCHAR (any visible US-ASCII character).
1440  Note that all rules derived from <x:ref>token</x:ref> are to
1441  be compared case-insensitively, like <x:ref>range-unit</x:ref> and
1442  <x:ref>acceptable-ranges</x:ref>.
[2629]1445  The rules below are defined in <xref target="RFC7230"/>:
1447<figure><artwork type="abnf2616">
[2667]1448  <x:ref>OWS</x:ref>        = &lt;OWS, see &whitespace;&gt;
1449  <x:ref>token</x:ref>      = &lt;token, see &field-components;&gt;
1452  The rules below are defined in other parts:
1454<figure><artwork type="abnf2616">
[2667]1455  <x:ref>HTTP-date</x:ref>  = &lt;HTTP-date, see &http-date;&gt;
1456  <x:ref>entity-tag</x:ref> = &lt;entity-tag, see &entity-tags;&gt;
[680]1460<?BEGININC p5-range.abnf-appendix ?>
[427]1461<section xmlns:x="" title="Collected ABNF" anchor="collected.abnf">
[2629]1463  In the collected ABNF below, list rules are expanded as per <xref target="RFC7230" x:rel="#notation"/>.
[427]1465<artwork type="abnf" name="p5-range.parsed-abnf">
[1232]1466<x:ref>Accept-Ranges</x:ref> = acceptable-ranges
[2135]1468<x:ref>Content-Range</x:ref> = byte-content-range / other-content-range
[2667]1470<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, see [RFC7231], Section;
[1232]1472<x:ref>If-Range</x:ref> = entity-tag / HTTP-date
[2667]1474<x:ref>OWS</x:ref> = &lt;OWS, see [RFC7230], Section 3.2.3&gt;
[1232]1476<x:ref>Range</x:ref> = byte-ranges-specifier / other-ranges-specifier
1478<x:ref>acceptable-ranges</x:ref> = ( *( "," OWS ) range-unit *( OWS "," [ OWS
[425]1479 range-unit ] ) ) / "none"
[2138]1481<x:ref>byte-content-range</x:ref> = bytes-unit SP ( byte-range-resp /
[2135]1482 unsatisfied-range )
1483<x:ref>byte-range</x:ref> = first-byte-pos "-" last-byte-pos
1484<x:ref>byte-range-resp</x:ref> = byte-range "/" ( complete-length / "*" )
[1663]1485<x:ref>byte-range-set</x:ref> = *( "," OWS ) ( byte-range-spec /
1486 suffix-byte-range-spec ) *( OWS "," [ OWS ( byte-range-spec /
1487 suffix-byte-range-spec ) ] )
[427]1488<x:ref>byte-range-spec</x:ref> = first-byte-pos "-" [ last-byte-pos ]
1489<x:ref>byte-ranges-specifier</x:ref> = bytes-unit "=" byte-range-set
1490<x:ref>bytes-unit</x:ref> = "bytes"
[2135]1492<x:ref>complete-length</x:ref> = 1*DIGIT
[2667]1494<x:ref>entity-tag</x:ref> = &lt;entity-tag, see [RFC7232], Section 2.3&gt;
1496<x:ref>first-byte-pos</x:ref> = 1*DIGIT
1498<x:ref>last-byte-pos</x:ref> = 1*DIGIT
[2135]1500<x:ref>other-content-range</x:ref> = other-range-unit SP other-range-resp
1501<x:ref>other-range-resp</x:ref> = *CHAR
[2507]1502<x:ref>other-range-set</x:ref> = 1*VCHAR
[427]1503<x:ref>other-range-unit</x:ref> = token
[638]1504<x:ref>other-ranges-specifier</x:ref> = other-range-unit "=" other-range-set
1506<x:ref>range-unit</x:ref> = bytes-unit / other-range-unit
1508<x:ref>suffix-byte-range-spec</x:ref> = "-" suffix-length
1509<x:ref>suffix-length</x:ref> = 1*DIGIT
[2667]1511<x:ref>token</x:ref> = &lt;token, see [RFC7230], Section 3.2.6&gt;
1513<x:ref>unsatisfied-range</x:ref> = "*/" complete-length
[680]1517<?ENDINC p5-range.abnf-appendix ?>
Note: See TracBrowser for help on using the repository browser.