Ignore:
Timestamp:
20/01/13 16:15:04 (7 years ago)
Author:
fielding@…
Message:

(editorial) clean up p5 intro and range units

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p5-range.html

    r2143 r2144  
    628628      </ul>
    629629      <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a id="introduction" href="#introduction">Introduction</a></h1>
    630       <p id="rfc.section.1.p.1">HTTP clients often encounter interrupted data transfers as a result of canceled requests or dropped connections. When a client
    631          has stored a partial representation, it is desirable to request the remainder of that representation in a subsequent request
    632          rather than transfer the entire representation. There are also a number of Web applications that benefit from being able to
    633          request only a subset of a larger representation, such as a single page of a very large document or only part of an image
    634          to be rendered by a device with limited local storage.
    635       </p>
    636       <p id="rfc.section.1.p.2">This document defines HTTP/1.1 range requests, partial responses, and the multipart/byteranges media type. The protocol for
    637          range requests is an <em class="bcp14">OPTIONAL</em> feature of HTTP, designed so resources or recipients that do not implement this feature can respond as if it is a normal GET
    638          request without impacting interoperability. Partial responses are indicated by a distinct status code to not be mistaken for
    639          full responses by intermediate caches that might not implement the feature.
    640       </p>
    641       <p id="rfc.section.1.p.3">Although the HTTP range request mechanism is designed to allow for extensible range types, this specification only defines
    642          requests for byte ranges.
     630      <p id="rfc.section.1.p.1">Hypertext Transfer Protocol (HTTP) clients often encounter interrupted data transfers as a result of canceled requests or
     631         dropped connections. When a client has stored a partial representation, it is desirable to request the remainder of that representation
     632         in a subsequent request rather than transfer the entire representation. Likewise, devices with limited local storage might
     633         benefit from being able to request only a subset of a larger representation, such as a single page of a very large document,
     634         or the dimensions of an embedded image.
     635      </p>
     636      <p id="rfc.section.1.p.2">This document defines HTTP/1.1 range requests, partial responses, and the multipart/byteranges media type, obsoleting those
     637         parts previously defined in <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>. Range requests are an <em class="bcp14">OPTIONAL</em> feature of HTTP, designed so that recipients not implementing this feature (or not supporting it for the target resource)
     638         can respond as if it is a normal GET request without impacting interoperability. Partial responses are indicated by a distinct
     639         status code to not be mistaken for full responses by caches that might not implement the feature.
     640      </p>
     641      <p id="rfc.section.1.p.3">Although the range request mechanism is designed to allow for extensible range types, this specification only defines requests
     642         for byte ranges.
    643643      </p>
    644644      <h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;<a id="conformance" href="#conformance">Conformance and Error Handling</a></h2>
     
    653653      <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="range.units" href="#range.units">Range Units</a></h1>
    654654      <p id="rfc.section.2.p.1">A representation can be partitioned into subranges according to various structural units, depending on the structure inherent
    655          in the representation's media type. Such a <dfn>range unit</dfn> can be used in the <a href="#header.range" class="smpl">Range</a> (<a href="#header.range" id="rfc.xref.header.range.1" title="Range">Section&nbsp;3.1</a>) and <a href="#header.content-range" class="smpl">Content-Range</a> (<a href="#header.content-range" id="rfc.xref.header.content-range.1" title="Content-Range">Section&nbsp;4.4</a>) header fields to delineate the parts of a representation that are either requested or transferred, respectively.
    656       </p>
    657       <div id="rfc.figure.u.1"></div><pre class="inline"><span id="rfc.iref.g.1"></span><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span>  <a href="#range.units" class="smpl">range-unit</a>       = <a href="#range.units" class="smpl">bytes-unit</a> / <a href="#range.units" class="smpl">other-range-unit</a>
    658   <a href="#range.units" class="smpl">bytes-unit</a>       = "bytes"
    659   <a href="#range.units" class="smpl">other-range-unit</a> = <a href="#imported.abnf" class="smpl">token</a>
     655         in the representation's media type. This "<dfn>range unit</dfn>" is used in the <a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> (<a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges.1" title="Accept-Ranges">Section&nbsp;2.3</a>) response header field to advertise support for range requests, the <a href="#header.range" class="smpl">Range</a> (<a href="#header.range" id="rfc.xref.header.range.1" title="Range">Section&nbsp;3.1</a>) request header field to delineate the parts of a representation that are requested, and the <a href="#header.content-range" class="smpl">Content-Range</a> (<a href="#header.content-range" id="rfc.xref.header.content-range.1" title="Content-Range">Section&nbsp;4.4</a>) payload header field to describe which part of a representation is being transferred.
     656      </p>
     657      <div id="rfc.figure.u.1"></div><pre class="inline"><span id="rfc.iref.g.1"></span><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span>  <a href="#range.units" class="smpl">range-unit</a>       = <a href="#byte.ranges" class="smpl">bytes-unit</a> / <a href="#range.units.other" class="smpl">other-range-unit</a>
    660658</pre><h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a id="byte.ranges" href="#byte.ranges">Byte Ranges</a></h2>
    661       <p id="rfc.section.2.1.p.1">Since all HTTP representations are transferred as sequences of bytes, the concept of a byte range is meaningful for any HTTP
    662          representation. (However, not all clients and servers need to support byte-range operations.)
    663       </p>
    664       <p id="rfc.section.2.1.p.2">Byte range specifications in HTTP apply to the sequence of bytes in the representation data (not necessarily the same as the
    665          message body).
    666       </p>
    667       <div id="rule.ranges-specifier">
     659      <p id="rfc.section.2.1.p.1">Since representation data is transferred in payloads as a sequence of octets, a byte range is a meaningful substructure for
     660         any representation transferable over HTTP (<a href="p2-semantics.html#representations" title="Representations">Section 3</a> of <a href="#Part2" id="rfc.xref.Part2.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[Part2]</cite></a>). We define the "bytes" range unit for expressing subranges of the data's octet sequence.
     661      </p>
     662      <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.4"></span>  <a href="#byte.ranges" class="smpl">bytes-unit</a>       = "bytes"
     663</pre><div id="rule.ranges-specifier">
    668664         <p id="rfc.section.2.1.p.3">                A byte range operation <em class="bcp14">MAY</em> specify a single range of bytes, or a set of ranges within a single representation.
    669665         </p>
    670666      </div>
    671       <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span><span id="rfc.iref.g.6"></span><span id="rfc.iref.g.7"></span><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span>  <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> = <a href="#range.units" class="smpl">bytes-unit</a> "=" <a href="#rule.ranges-specifier" class="smpl">byte-range-set</a>
     667      <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.5"></span><span id="rfc.iref.g.6"></span><span id="rfc.iref.g.7"></span><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span><span id="rfc.iref.g.10"></span>  <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> = <a href="#byte.ranges" class="smpl">bytes-unit</a> "=" <a href="#rule.ranges-specifier" class="smpl">byte-range-set</a>
    672668  <a href="#rule.ranges-specifier" class="smpl">byte-range-set</a>  = 1#( <a href="#rule.ranges-specifier" class="smpl">byte-range-spec</a> / <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> )
    673669  <a href="#rule.ranges-specifier" class="smpl">byte-range-spec</a> = <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> "-" [ <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> ]
     
    685681      </p>
    686682      <p id="rfc.section.2.1.p.8">By its choice of last-byte-pos, a client can limit the number of bytes retrieved without knowing the size of the representation.</p>
    687       <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.10"></span><span id="rfc.iref.g.11"></span>  <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> = "-" <a href="#rule.ranges-specifier" class="smpl">suffix-length</a>
     683      <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.11"></span><span id="rfc.iref.g.12"></span>  <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> = "-" <a href="#rule.ranges-specifier" class="smpl">suffix-length</a>
    688684  <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> = 1*<a href="#imported.abnf" class="smpl">DIGIT</a>
    689685</pre><p id="rfc.section.2.1.p.10">A suffix-byte-range-spec is used to specify the suffix of the representation data, of a length given by the suffix-length
     
    700696      <ul>
    701697         <li>The first 500 bytes (byte offsets 0-499, inclusive):
    702             <div id="rfc.figure.u.4"></div><pre class="text">  bytes=0-499
     698            <div id="rfc.figure.u.5"></div><pre class="text">  bytes=0-499
    703699</pre> </li>
    704700         <li>The second 500 bytes (byte offsets 500-999, inclusive):
    705             <div id="rfc.figure.u.5"></div><pre class="text">  bytes=500-999
     701            <div id="rfc.figure.u.6"></div><pre class="text">  bytes=500-999
    706702</pre> </li>
    707703         <li>The final 500 bytes (byte offsets 9500-9999, inclusive):
    708             <div id="rfc.figure.u.6"></div><pre class="text">  bytes=-500
    709 </pre> Or: <div id="rfc.figure.u.7"></div><pre class="text">  bytes=9500-
     704            <div id="rfc.figure.u.7"></div><pre class="text">  bytes=-500
     705</pre> Or: <div id="rfc.figure.u.8"></div><pre class="text">  bytes=9500-
    710706</pre> </li>
    711707         <li>The first and last bytes only (bytes 0 and 9999):
    712             <div id="rfc.figure.u.8"></div><pre class="text">  bytes=0-0,-1
     708            <div id="rfc.figure.u.9"></div><pre class="text">  bytes=0-0,-1
    713709</pre> </li>
    714          <li>Several legal but not canonical specifications of the second 500 bytes (byte offsets 500-999, inclusive):
    715             <div id="rfc.figure.u.9"></div><pre class="text">  bytes=500-600,601-999
     710         <li>Other valid (but not canonical) specifications of the second 500 bytes (byte offsets 500-999, inclusive):
     711            <div id="rfc.figure.u.10"></div><pre class="text">  bytes=500-600,601-999
    716712  bytes=500-700,601-999
    717713</pre> </li>
    718714      </ul>
    719715      <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;<a id="range.units.other" href="#range.units.other">Other Range Units</a></h2>
    720       <p id="rfc.section.2.2.p.1">The only range unit defined by HTTP/1.1 is "bytes" (<a href="#byte.ranges" title="Byte Ranges">Section&nbsp;2.1</a>). Additional units can be defined as described in <a href="#range.unit.registry" title="Range Unit Registry">Section&nbsp;5.1</a>.
    721       </p>
    722       <div id="rfc.iref.a.1"></div>
     716      <p id="rfc.section.2.2.p.1">Range units are intended to be extensible. New range units ought to be registered with IANA, as defined in <a href="#range.unit.registry" title="Range Unit Registry">Section&nbsp;5.1</a>.
     717      </p>
     718      <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.13"></span>  <a href="#range.units.other" class="smpl">other-range-unit</a> = <a href="#imported.abnf" class="smpl">token</a>
     719</pre><div id="rfc.iref.a.1"></div>
    723720      <h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a>&nbsp;<a id="header.accept-ranges" href="#header.accept-ranges">Accept-Ranges</a></h2>
    724721      <p id="rfc.section.2.3.p.1">The "Accept-Ranges" header field allows a resource to indicate its acceptance of range requests.</p>
    725       <div id="rfc.figure.u.10"></div><pre class="inline"><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span>  <a href="#header.accept-ranges" class="smpl">Accept-Ranges</a>     = <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a>
     722      <div id="rfc.figure.u.12"></div><pre class="inline"><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span>  <a href="#header.accept-ranges" class="smpl">Accept-Ranges</a>     = <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a>
    726723  <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a> = 1#<a href="#range.units" class="smpl">range-unit</a> / "none"
    727724</pre><p id="rfc.section.2.3.p.3">Origin servers that accept byte-range requests <em class="bcp14">MAY</em> send
    728725      </p>
    729       <div id="rfc.figure.u.11"></div><pre class="text">  Accept-Ranges: bytes
     726      <div id="rfc.figure.u.13"></div><pre class="text">  Accept-Ranges: bytes
    730727</pre><p id="rfc.section.2.3.p.5">but are not required to do so. Clients <em class="bcp14">MAY</em> generate range requests without having received this header field for the resource involved. Range units are defined in <a href="#range.units" title="Range Units">Section&nbsp;2</a>.
    731728      </p>
    732729      <p id="rfc.section.2.3.p.6">Servers that do not accept any kind of range request for a resource <em class="bcp14">MAY</em> send
    733730      </p>
    734       <div id="rfc.figure.u.12"></div><pre class="text">  Accept-Ranges: none
     731      <div id="rfc.figure.u.14"></div><pre class="text">  Accept-Ranges: none
    735732</pre><p id="rfc.section.2.3.p.8">to advise the client not to attempt a range request.</p>
    736733      <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a id="range.requests" href="#range.requests">Range Requests</a></h1>
     
    740737         of the selected representation data in a successful response, rather than the entire representation data.
    741738      </p>
    742       <div id="rfc.figure.u.13"></div><pre class="inline"><span id="rfc.iref.g.14"></span>  <a href="#header.range" class="smpl">Range</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> / <a href="#header.range" class="smpl">other-ranges-specifier</a>
    743   <a href="#header.range" class="smpl">other-ranges-specifier</a> = <a href="#range.units" class="smpl">other-range-unit</a> "=" <a href="#header.range" class="smpl">other-range-set</a>
     739      <div id="rfc.figure.u.15"></div><pre class="inline"><span id="rfc.iref.g.16"></span>  <a href="#header.range" class="smpl">Range</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> / <a href="#header.range" class="smpl">other-ranges-specifier</a>
     740  <a href="#header.range" class="smpl">other-ranges-specifier</a> = <a href="#range.units.other" class="smpl">other-range-unit</a> "=" <a href="#header.range" class="smpl">other-range-set</a>
    744741  <a href="#header.range" class="smpl">other-range-set</a> = 1*<a href="#imported.abnf" class="smpl">CHAR</a>
    745742</pre><p id="rfc.section.3.1.p.3">A server <em class="bcp14">MAY</em> ignore the Range header field. However, origin servers and intermediate caches ought to support byte ranges when possible,
     
    765762         is unchanged, send me the part(s) that I am requesting in Range; otherwise, send me the entire representation.
    766763      </p>
    767       <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.15"></span>  <a href="#header.if-range" class="smpl">If-Range</a> = <a href="#imported.abnf" class="smpl">entity-tag</a> / <a href="#imported.abnf" class="smpl">HTTP-date</a>
     764      <div id="rfc.figure.u.16"></div><pre class="inline"><span id="rfc.iref.g.17"></span>  <a href="#header.if-range" class="smpl">If-Range</a> = <a href="#imported.abnf" class="smpl">entity-tag</a> / <a href="#imported.abnf" class="smpl">HTTP-date</a>
    768765</pre><p id="rfc.section.3.2.p.4">Clients <em class="bcp14">MUST NOT</em> use an entity-tag marked as weak in an If-Range field value and <em class="bcp14">MUST NOT</em> use a <a href="p4-conditional.html#header.last-modified" class="smpl">Last-Modified</a> date in an If-Range field value unless it has no entity-tag for the representation and the Last-Modified date it does have
    769766         for the representation is strong in the sense defined by <a href="p4-conditional.html#lastmod.comparison" title="Comparison">Section 2.2.2</a> of <a href="#Part4" id="rfc.xref.Part4.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>.
     
    783780         a request for a set of ranges that overlap without any holes), this content is transmitted with a <a href="#header.content-range" class="smpl">Content-Range</a> header field, and a <a href="p1-messaging.html#header.content-length" class="smpl">Content-Length</a> header field showing the number of bytes actually transferred. For example,
    784781      </p>
    785       <div id="rfc.figure.u.15"></div><pre class="text">HTTP/1.1 206 Partial Content
     782      <div id="rfc.figure.u.17"></div><pre class="text">HTTP/1.1 206 Partial Content
    786783Date: Wed, 15 Nov 1995 06:25:24 GMT
    787784Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
     
    799796      <p id="rfc.section.4.1.p.6">When a client asks for multiple ranges in one request, the server <em class="bcp14">SHOULD</em> send them in the order that they appeared in the request.
    800797      </p>
    801       <div id="rfc.iref.18"></div>
     798      <div id="rfc.iref.20"></div>
    802799      <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;<a id="status.206" href="#status.206">206 Partial Content</a></h2>
    803800      <p id="rfc.section.4.2.p.1">The <dfn>206 (Partial Content)</dfn> status code indicates that the server has fulfilled the partial GET request for the resource. The request <em class="bcp14">MUST</em> have included a <a href="#header.range" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.2" title="Range">Section&nbsp;3.1</a>) indicating the desired range, and <em class="bcp14">MAY</em> have included an <a href="#header.if-range" class="smpl">If-Range</a> header field (<a href="#header.if-range" id="rfc.xref.header.if-range.2" title="If-Range">Section&nbsp;3.2</a>) to make the request conditional.
     
    816813      <p id="rfc.section.4.2.p.4">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 206 responses.
    817814      </p>
    818       <div id="rfc.iref.18"></div>
     815      <div id="rfc.iref.20"></div>
    819816      <h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a>&nbsp;<a id="status.416" href="#status.416">416 Range Not Satisfiable</a></h2>
    820817      <p id="rfc.section.4.3.p.1">The <dfn>416 (Range Not Satisfiable)</dfn> status code indicates that none of the ranges-specifier values in the request's <a href="#header.range" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.3" title="Range">Section&nbsp;3.1</a>) overlap the current extent of the selected resource and the request did not include an <a href="#header.if-range" class="smpl">If-Range</a> header field (<a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section&nbsp;3.2</a>). (For byte-ranges, this means that the first-byte-pos of all of the byte-range-spec values were greater than the current
     
    823820      <p id="rfc.section.4.3.p.2">When this status code is sent in response to a byte-range request, the sender <em class="bcp14">SHOULD</em> generate a <a href="#header.content-range" class="smpl">Content-Range</a> header field specifying the current length of the selected representation (see <a href="#header.content-range" id="rfc.xref.header.content-range.3" title="Content-Range">Section&nbsp;4.4</a>).
    824821      </p>
    825       <div id="rfc.figure.u.16"></div>
     822      <div id="rfc.figure.u.18"></div>
    826823      <p>For example:</p>  <pre class="text">HTTP/1.1 416 Range Not Satisfiable
    827824Date: Mon, 20 Jan 2012 15:41:54 GMT
     
    838835         body is intended to be applied.
    839836      </p>
    840       <div id="rfc.figure.u.17"></div><pre class="inline"><span id="rfc.iref.g.16"></span><span id="rfc.iref.g.17"></span><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span><span id="rfc.iref.g.20"></span><span id="rfc.iref.g.21"></span><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span>  <a href="#header.content-range" class="smpl">Content-Range</a>       = <a href="#header.content-range" class="smpl">byte-content-range</a>
     837      <div id="rfc.figure.u.19"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span><span id="rfc.iref.g.20"></span><span id="rfc.iref.g.21"></span><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span>  <a href="#header.content-range" class="smpl">Content-Range</a>       = <a href="#header.content-range" class="smpl">byte-content-range</a>
    841838                      / <a href="#header.content-range" class="smpl">other-content-range</a>
    842839                         
    843   <a href="#header.content-range" class="smpl">byte-content-range</a>  = <a href="#range.units" class="smpl">bytes-unit</a> <a href="#imported.abnf" class="smpl">SP</a>
     840  <a href="#header.content-range" class="smpl">byte-content-range</a>  = <a href="#byte.ranges" class="smpl">bytes-unit</a> <a href="#imported.abnf" class="smpl">SP</a>
    844841                        ( <a href="#header.content-range" class="smpl">byte-range-resp</a> / <a href="#header.content-range" class="smpl">unsatisfied-range</a> )
    845842
     
    850847  <a href="#header.content-range" class="smpl">complete-length</a>     = 1*<a href="#imported.abnf" class="smpl">DIGIT</a>
    851848 
    852   <a href="#header.content-range" class="smpl">other-content-range</a> = <a href="#range.units" class="smpl">other-range-unit</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#header.content-range" class="smpl">other-range-resp</a>
     849  <a href="#header.content-range" class="smpl">other-content-range</a> = <a href="#range.units.other" class="smpl">other-range-unit</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#header.content-range" class="smpl">other-range-resp</a>
    853850  <a href="#header.content-range" class="smpl">other-range-resp</a>    = *<a href="#imported.abnf" class="smpl">CHAR</a>
    854851</pre><p id="rfc.section.4.4.p.3">Range units are defined in <a href="#range.units" title="Range Units">Section&nbsp;2</a>. A recipient of a <a href="#status.206" class="smpl">206 (Partial Content)</a> response containing a <a href="#header.content-range" class="smpl">Content-Range</a> header field with a <a href="#range.units" class="smpl">range unit</a> that the recipient does not understand <em class="bcp14">MUST NOT</em> attempt to recombine it with a stored representation. A proxy that receives such a message <em class="bcp14">SHOULD</em> forward it downstream.
     
    864861         selected representation is known by the sender to be 1234 bytes:
    865862      </p>
    866       <div id="rfc.figure.u.18"></div><pre class="text">  Content-Range: bytes 42-1233/1234
     863      <div id="rfc.figure.u.20"></div><pre class="text">  Content-Range: bytes 42-1233/1234
    867864</pre><p id="rfc.section.4.4.p.8">or this second example would apply when the complete length is unknown:</p>
    868       <div id="rfc.figure.u.19"></div><pre class="text">  Content-Range: bytes 42-1233/*
     865      <div id="rfc.figure.u.21"></div><pre class="text">  Content-Range: bytes 42-1233/*
    869866</pre><p id="rfc.section.4.4.p.10">A server generating a <a href="#status.416" class="smpl">416 (Range Not Satisfiable)</a> response to a byte range request <em class="bcp14">SHOULD</em> send a Content-Range header field with an <a href="#header.content-range" class="smpl">unsatisfied-range</a> value, as in the following example:
    870867      </p>
    871       <div id="rfc.figure.u.20"></div><pre class="text">  Content-Range: bytes */1234
     868      <div id="rfc.figure.u.22"></div><pre class="text">  Content-Range: bytes */1234
    872869</pre><p id="rfc.section.4.4.p.12">The complete-length in a 416 response indicates the current length of the selected representation, which will be known by
    873870         the server generating the response because that is how it determined the range to be unsatisfiable.
     
    879876      <ul>
    880877         <li>The first 500 bytes:
    881             <div id="rfc.figure.u.21"></div><pre class="text">  Content-Range: bytes 0-499/1234
     878            <div id="rfc.figure.u.23"></div><pre class="text">  Content-Range: bytes 0-499/1234
    882879</pre> </li>
    883880         <li>The second 500 bytes:
    884             <div id="rfc.figure.u.22"></div><pre class="text">  Content-Range: bytes 500-999/1234
     881            <div id="rfc.figure.u.24"></div><pre class="text">  Content-Range: bytes 500-999/1234
    885882</pre> </li>
    886883         <li>All except for the first 500 bytes:
    887             <div id="rfc.figure.u.23"></div><pre class="text">  Content-Range: bytes 500-1233/1234
     884            <div id="rfc.figure.u.25"></div><pre class="text">  Content-Range: bytes 500-1233/1234
    888885</pre> </li>
    889886         <li>The last 500 bytes:
    890             <div id="rfc.figure.u.24"></div><pre class="text">  Content-Range: bytes 734-1233/1234
     887            <div id="rfc.figure.u.26"></div><pre class="text">  Content-Range: bytes 734-1233/1234
    891888</pre> </li>
    892889      </ul>
     
    941938                  <td class="left">bytes</td>
    942939                  <td class="left">a range of octets</td>
    943                   <td class="left"><a href="#range.units" title="Range Units">Section&nbsp;2</a></td>
     940                  <td class="left"><a href="#byte.ranges" title="Byte Ranges">Section&nbsp;2.1</a></td>
    944941               </tr>
    945942               <tr>
    946943                  <td class="left">none</td>
    947944                  <td class="left">reserved as keyword, indicating no ranges are supported</td>
    948                   <td class="left"><a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges.1" title="Accept-Ranges">Section&nbsp;2.3</a></td>
     945                  <td class="left"><a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges.2" title="Accept-Ranges">Section&nbsp;2.3</a></td>
    949946               </tr>
    950947            </tbody>
     
    1000997                  <td class="left">http</td>
    1001998                  <td class="left">standard</td>
    1002                   <td class="left"> <a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges.2" title="Accept-Ranges">Section&nbsp;2.3</a>
     999                  <td class="left"> <a href="#header.accept-ranges" id="rfc.xref.header.accept-ranges.3" title="Accept-Ranges">Section&nbsp;2.3</a>
    10031000                  </td>
    10041001               </tr>
     
    10301027      <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a id="security.considerations" href="#security.considerations">Security Considerations</a></h1>
    10311028      <p id="rfc.section.6.p.1">This section is meant to inform developers, information providers, and users of known security concerns specific to the HTTP/1.1
    1032          range request mechanisms. More general security considerations are addressed in HTTP messaging <a href="#Part1" id="rfc.xref.Part1.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a> and semantics <a href="#Part2" id="rfc.xref.Part2.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[Part2]</cite></a>.
     1029         range request mechanisms. More general security considerations are addressed in HTTP messaging <a href="#Part1" id="rfc.xref.Part1.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a> and semantics <a href="#Part2" id="rfc.xref.Part2.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[Part2]</cite></a>.
    10331030      </p>
    10341031      <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;<a id="overlapping.ranges" href="#overlapping.ranges">Overlapping Ranges</a></h2>
     
    11691166         </p>
    11701167      </div>
    1171       <div id="rfc.figure.u.25"></div>
     1168      <div id="rfc.figure.u.27"></div>
    11721169      <p>For example:</p><pre class="text">  HTTP/1.1 206 Partial Content
    11731170  Date: Wed, 15 Nov 1995 06:25:24 GMT
     
    11871184  ...the second range
    11881185  --THIS_STRING_SEPARATES--
    1189 </pre><div id="rfc.figure.u.26"></div>
     1186</pre><div id="rfc.figure.u.28"></div>
    11901187      <p>Another example, using the "exampleunit" range unit:</p>  <pre class="text">  HTTP/1.1 206 Partial Content
    11911188  Date: Tue, 14 Nov 1995 06:25:24 GMT
     
    12351232      <p id="rfc.section.C.p.3">The rules below are defined in <a href="#Part1" id="rfc.xref.Part1.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>:
    12361233      </p>
    1237       <div id="rfc.figure.u.27"></div><pre class="inline">  <a href="#imported.abnf" class="smpl">OWS</a>        = &lt;OWS, defined in <a href="#Part1" id="rfc.xref.Part1.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>, <a href="p1-messaging.html#whitespace" title="Whitespace">Section 3.2.3</a>&gt;
     1234      <div id="rfc.figure.u.29"></div><pre class="inline">  <a href="#imported.abnf" class="smpl">OWS</a>        = &lt;OWS, defined in <a href="#Part1" id="rfc.xref.Part1.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>, <a href="p1-messaging.html#whitespace" title="Whitespace">Section 3.2.3</a>&gt;
    12381235  <a href="#imported.abnf" class="smpl">token</a>      = &lt;token, defined in <a href="#Part1" id="rfc.xref.Part1.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>, <a href="p1-messaging.html#field.components" title="Field value components">Section 3.2.6</a>&gt;
    12391236</pre><p id="rfc.section.C.p.5">The rules below are defined in other parts:</p>
    1240       <div id="rfc.figure.u.28"></div><pre class="inline">  <a href="#imported.abnf" class="smpl">HTTP-date</a>  = &lt;HTTP-date, defined in <a href="#Part2" id="rfc.xref.Part2.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[Part2]</cite></a>, <a href="p2-semantics.html#http.date" title="Date/Time Formats">Section 7.1.1.1</a>&gt;
     1237      <div id="rfc.figure.u.30"></div><pre class="inline">  <a href="#imported.abnf" class="smpl">HTTP-date</a>  = &lt;HTTP-date, defined in <a href="#Part2" id="rfc.xref.Part2.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[Part2]</cite></a>, <a href="p2-semantics.html#http.date" title="Date/Time Formats">Section 7.1.1.1</a>&gt;
    12411238  <a href="#imported.abnf" class="smpl">entity-tag</a> = &lt;entity-tag, defined in <a href="#Part4" id="rfc.xref.Part4.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>, <a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a>&gt;
    12421239</pre><h1 id="rfc.section.D"><a href="#rfc.section.D">D.</a>&nbsp;<a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1>
    1243       <div id="rfc.figure.u.29"></div> <pre class="inline"><a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = acceptable-ranges
     1240      <div id="rfc.figure.u.31"></div> <pre class="inline"><a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = acceptable-ranges
    12441241
    12451242<a href="#header.content-range" class="smpl">Content-Range</a> = byte-content-range / other-content-range
     
    12651262<a href="#rule.ranges-specifier" class="smpl">byte-range-spec</a> = first-byte-pos "-" [ last-byte-pos ]
    12661263<a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> = bytes-unit "=" byte-range-set
    1267 <a href="#range.units" class="smpl">bytes-unit</a> = "bytes"
     1264<a href="#byte.ranges" class="smpl">bytes-unit</a> = "bytes"
    12681265
    12691266<a href="#header.content-range" class="smpl">complete-length</a> = 1*DIGIT
     
    12781275<a href="#header.content-range" class="smpl">other-range-resp</a> = *CHAR
    12791276<a href="#header.range" class="smpl">other-range-set</a> = 1*CHAR
    1280 <a href="#range.units" class="smpl">other-range-unit</a> = token
     1277<a href="#range.units.other" class="smpl">other-range-unit</a> = token
    12811278<a href="#header.range" class="smpl">other-ranges-specifier</a> = other-range-unit "=" other-range-set
    12821279
     
    13191316         <ul class="ind">
    13201317            <li><a id="rfc.index.2" href="#rfc.index.2"><b>2</b></a><ul>
    1321                   <li>206 Partial Content (status code)&nbsp;&nbsp;<a href="#rfc.iref.18"><b>4.2</b></a>, <a href="#rfc.xref.status.206.1">5.2</a>, <a href="#rfc.xref.status.206.2">B</a></li>
     1318                  <li>206 Partial Content (status code)&nbsp;&nbsp;<a href="#rfc.iref.20"><b>4.2</b></a>, <a href="#rfc.xref.status.206.1">5.2</a>, <a href="#rfc.xref.status.206.2">B</a></li>
    13221319               </ul>
    13231320            </li>
    13241321            <li><a id="rfc.index.4" href="#rfc.index.4"><b>4</b></a><ul>
    1325                   <li>416 Range Not Satisfiable (status code)&nbsp;&nbsp;<a href="#rfc.iref.18"><b>4.3</b></a>, <a href="#rfc.xref.status.416.1">5.2</a></li>
     1322                  <li>416 Range Not Satisfiable (status code)&nbsp;&nbsp;<a href="#rfc.iref.20"><b>4.3</b></a>, <a href="#rfc.xref.status.416.1">5.2</a></li>
    13261323               </ul>
    13271324            </li>
    13281325            <li><a id="rfc.index.A" href="#rfc.index.A"><b>A</b></a><ul>
    1329                   <li>Accept-Ranges header field&nbsp;&nbsp;<a href="#rfc.iref.a.1"><b>2.3</b></a>, <a href="#rfc.xref.header.accept-ranges.1">5.1.2</a>, <a href="#rfc.xref.header.accept-ranges.2">5.3</a></li>
     1326                  <li>Accept-Ranges header field&nbsp;&nbsp;<a href="#rfc.xref.header.accept-ranges.1">2</a>, <a href="#rfc.iref.a.1"><b>2.3</b></a>, <a href="#rfc.xref.header.accept-ranges.2">5.1.2</a>, <a href="#rfc.xref.header.accept-ranges.3">5.3</a></li>
    13301327               </ul>
    13311328            </li>
     
    13421339                  <li><tt>Grammar</tt>&nbsp;&nbsp;
    13431340                     <ul>
    1344                         <li><tt>Accept-Ranges</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.12"><b>2.3</b></a></li>
    1345                         <li><tt>acceptable-ranges</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.13"><b>2.3</b></a></li>
    1346                         <li><tt>byte-content-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.17"><b>4.4</b></a></li>
    1347                         <li><tt>byte-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.19"><b>4.4</b></a></li>
    1348                         <li><tt>byte-range-resp</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.18"><b>4.4</b></a></li>
    1349                         <li><tt>byte-range-set</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.6"><b>2.1</b></a></li>
    1350                         <li><tt>byte-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.7"><b>2.1</b></a></li>
    1351                         <li><tt>byte-ranges-specifier</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.5"><b>2.1</b></a></li>
    1352                         <li><tt>bytes-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.2"><b>2</b></a></li>
    1353                         <li><tt>complete-length</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.23"><b>4.4</b></a></li>
    1354                         <li><tt>Content-Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.16"><b>4.4</b></a></li>
    1355                         <li><tt>first-byte-pos</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.8"><b>2.1</b></a></li>
    1356                         <li><tt>If-Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.15"><b>3.2</b></a></li>
    1357                         <li><tt>last-byte-pos</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.9"><b>2.1</b></a></li>
    1358                         <li><tt>other-content-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.21"><b>4.4</b></a></li>
    1359                         <li><tt>other-range-resp</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.22"><b>4.4</b></a></li>
    1360                         <li><tt>other-range-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.3"><b>2</b></a></li>
    1361                         <li><tt>Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.14"><b>3.1</b></a></li>
     1341                        <li><tt>Accept-Ranges</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.14"><b>2.3</b></a></li>
     1342                        <li><tt>acceptable-ranges</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.15"><b>2.3</b></a></li>
     1343                        <li><tt>byte-content-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.19"><b>4.4</b></a></li>
     1344                        <li><tt>byte-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.21"><b>4.4</b></a></li>
     1345                        <li><tt>byte-range-resp</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.20"><b>4.4</b></a></li>
     1346                        <li><tt>byte-range-set</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.7"><b>2.1</b></a></li>
     1347                        <li><tt>byte-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.8"><b>2.1</b></a></li>
     1348                        <li><tt>byte-ranges-specifier</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.6"><b>2.1</b></a></li>
     1349                        <li><tt>bytes-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.2">2</a>, <a href="#rfc.iref.g.4"><b>2.1</b></a></li>
     1350                        <li><tt>complete-length</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.25"><b>4.4</b></a></li>
     1351                        <li><tt>Content-Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.18"><b>4.4</b></a></li>
     1352                        <li><tt>first-byte-pos</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.9"><b>2.1</b></a></li>
     1353                        <li><tt>If-Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.17"><b>3.2</b></a></li>
     1354                        <li><tt>last-byte-pos</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.10"><b>2.1</b></a></li>
     1355                        <li><tt>other-content-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.23"><b>4.4</b></a></li>
     1356                        <li><tt>other-range-resp</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.24"><b>4.4</b></a></li>
     1357                        <li><tt>other-range-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.3">2</a>, <a href="#rfc.iref.g.13"><b>2.2</b></a></li>
     1358                        <li><tt>Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.16"><b>3.1</b></a></li>
    13621359                        <li><tt>range-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.1"><b>2</b></a></li>
    1363                         <li><tt>ranges-specifier</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.4"><b>2.1</b></a></li>
    1364                         <li><tt>suffix-byte-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.10"><b>2.1</b></a></li>
    1365                         <li><tt>suffix-length</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.11"><b>2.1</b></a></li>
    1366                         <li><tt>unsatisfied-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.20"><b>4.4</b></a></li>
     1360                        <li><tt>ranges-specifier</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.5"><b>2.1</b></a></li>
     1361                        <li><tt>suffix-byte-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.11"><b>2.1</b></a></li>
     1362                        <li><tt>suffix-length</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.12"><b>2.1</b></a></li>
     1363                        <li><tt>unsatisfied-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.22"><b>4.4</b></a></li>
    13671364                     </ul>
    13681365                  </li>
     
    13931390                     </ul>
    13941391                  </li>
    1395                   <li><em>Part2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part2.1">6</a>, <a href="#Part2"><b>8.1</b></a>, <a href="#rfc.xref.Part2.2">C</a><ul>
    1396                         <li><em>Section 7.1.1.1</em>&nbsp;&nbsp;<a href="#rfc.xref.Part2.2">C</a></li>
     1392                  <li><em>Part2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part2.1">2.1</a>, <a href="#rfc.xref.Part2.2">6</a>, <a href="#Part2"><b>8.1</b></a>, <a href="#rfc.xref.Part2.3">C</a><ul>
     1393                        <li><em>Section 3</em>&nbsp;&nbsp;<a href="#rfc.xref.Part2.1">2.1</a></li>
     1394                        <li><em>Section 7.1.1.1</em>&nbsp;&nbsp;<a href="#rfc.xref.Part2.3">C</a></li>
    13971395                     </ul>
    13981396                  </li>
     
    14151413                  </li>
    14161414                  <li><em>RFC2119</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2119.1">1.1</a>, <a href="#RFC2119"><b>8.1</b></a></li>
    1417                   <li><em>RFC2616</em>&nbsp;&nbsp;<a href="#RFC2616"><b>8.2</b></a></li>
     1415                  <li><em>RFC2616</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.1">1</a>, <a href="#RFC2616"><b>8.2</b></a></li>
    14181416                  <li><em>RFC5226</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5226.1">5.1.1</a>, <a href="#RFC5226"><b>8.2</b></a><ul>
    14191417                        <li><em>Section 4.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5226.1">5.1.1</a></li>
Note: See TracChangeset for help on using the changeset viewer.