Ignore:
Timestamp:
20/01/13 01:58:48 (8 years ago)
Author:
fielding@…
Message:

Cleanup on aisle p5. Addresses #405

Don't refer to Range Units as Range Specifiers;
move requirements on unknown ranges to the header field definitions.
Disentangle the Content-Range ABNF so that it correctly distinguishes between
the three different forms in use and does not allow them to be mixed.
Use the new ABNF alternatives to simplify the prose.

File:
1 edited

Legend:

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

    r2134 r2135  
    577577         </li>
    578578         <li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#range.units">Range Units</a><ul>
    579                <li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#range.specifier.registry">Range Specifier Registry</a></li>
     579               <li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#range.unit.registry">Range Unit Registry</a></li>
    580580            </ul>
    581581         </li>
     
    655655      </p>
    656656      <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="range.units" href="#range.units">Range Units</a></h1>
    657       <p id="rfc.section.2.p.1">HTTP/1.1 allows a client to request that only part (a range) of the representation be included within the response. HTTP/1.1
    658          uses range units in the <a href="#range.retrieval.requests" class="smpl">Range</a> (<a href="#header.range" id="rfc.xref.header.range.1" title="Range">Section&nbsp;5.4</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;5.2</a>) header fields. A representation can be broken down into subranges according to various structural units.
     657      <p id="rfc.section.2.p.1">A representation can be partitioned into subranges according to various structural units, depending on the structure inherent
     658         in the representation's media type. Such a <dfn>range unit</dfn> can be used in the <a href="#range.retrieval.requests" class="smpl">Range</a> (<a href="#header.range" id="rfc.xref.header.range.1" title="Range">Section&nbsp;5.4</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;5.2</a>) header fields to delineate the parts of a representation that are either requested or transferred, respectively.
    659659      </p>
    660660      <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>
    661661  <a href="#range.units" class="smpl">bytes-unit</a>       = "bytes"
    662662  <a href="#range.units" class="smpl">other-range-unit</a> = <a href="#imported.abnf" class="smpl">token</a>
    663 </pre><p id="rfc.section.2.p.3">HTTP/1.1 has been designed to allow implementations of applications that do not depend on knowledge of ranges. The only range
    664          unit defined by HTTP/1.1 is "bytes". Additional specifiers can be defined as described in <a href="#range.specifier.registry" title="Range Specifier Registry">Section&nbsp;2.1</a>.
    665       </p>
    666       <p id="rfc.section.2.p.4">If a range unit is not understood in a request, a server <em class="bcp14">MUST</em> ignore the whole <a href="#range.retrieval.requests" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.2" title="Range">Section&nbsp;5.4</a>). If a range unit is not understood in a response, an intermediary <em class="bcp14">SHOULD</em> pass the response to the client; a client <em class="bcp14">MUST</em> fail.
    667       </p>
    668       <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a id="range.specifier.registry" href="#range.specifier.registry">Range Specifier Registry</a></h2>
    669       <p id="rfc.section.2.1.p.1">The HTTP Range Specifier Registry defines the name space for the range specifier names.</p>
     663</pre><p id="rfc.section.2.p.3">The only range unit defined by HTTP/1.1 is "bytes" (<a href="#byte.ranges" title="Byte Ranges">Section&nbsp;5.4.1</a>). Additional units can be defined as described in <a href="#range.unit.registry" title="Range Unit Registry">Section&nbsp;2.1</a>.
     664      </p>
     665      <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a id="range.unit.registry" href="#range.unit.registry">Range Unit Registry</a></h2>
     666      <p id="rfc.section.2.1.p.1">The HTTP Range Unit Registry defines the name space for the range unit names and refers to their corresponding specifications.</p>
    670667      <p id="rfc.section.2.1.p.2">Registrations <em class="bcp14">MUST</em> include the following fields:
    671668      </p>
     
    682679      <div id="rfc.iref.3"></div>
    683680      <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a id="status.206" href="#status.206">206 Partial Content</a></h2>
    684       <p id="rfc.section.3.1.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="#range.retrieval.requests" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.3" title="Range">Section&nbsp;5.4</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.1" title="If-Range">Section&nbsp;5.3</a>) to make the request conditional.
     681      <p id="rfc.section.3.1.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="#range.retrieval.requests" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.2" title="Range">Section&nbsp;5.4</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.1" title="If-Range">Section&nbsp;5.3</a>) to make the request conditional.
    685682      </p>
    686683      <p id="rfc.section.3.1.p.2">When a 206 response is generated, the sender <em class="bcp14">MUST</em> generate the following header fields:
     
    699696      <div id="rfc.iref.3"></div>
    700697      <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;<a id="status.416" href="#status.416">416 Range Not Satisfiable</a></h2>
    701       <p id="rfc.section.3.2.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="#range.retrieval.requests" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.4" title="Range">Section&nbsp;5.4</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.2" title="If-Range">Section&nbsp;5.3</a>). (For byte-ranges, this means that the first-byte-pos of all of the byte-range-spec values were greater than the current
     698      <p id="rfc.section.3.2.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="#range.retrieval.requests" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.3" title="Range">Section&nbsp;5.4</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.2" title="If-Range">Section&nbsp;5.3</a>). (For byte-ranges, this means that the first-byte-pos of all of the byte-range-spec values were greater than the current
    702699         length of the selected representation.)
    703700      </p>
     
    776773         body is intended to be applied.
    777774      </p>
    778       <p id="rfc.section.5.2.p.2">Range units are defined in <a href="#range.units" title="Range Units">Section&nbsp;2</a>.
    779       </p>
    780       <div id="rfc.figure.u.7"></div><pre class="inline"><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="#header.content-range" class="smpl">Content-Range</a>           = <a href="#header.content-range" class="smpl">byte-content-range-spec</a>
    781                           / <a href="#header.content-range" class="smpl">other-content-range-spec</a>
     775      <div id="rfc.figure.u.7"></div><pre class="inline"><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><span id="rfc.iref.g.11"></span><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span>  <a href="#header.content-range" class="smpl">Content-Range</a>       = <a href="#header.content-range" class="smpl">byte-content-range</a>
     776                      / <a href="#header.content-range" class="smpl">other-content-range</a>
    782777                         
    783   <a href="#header.content-range" class="smpl">byte-content-range-spec</a> = <a href="#range.units" class="smpl">bytes-unit</a> <a href="#imported.abnf" class="smpl">SP</a>
    784                             <a href="#header.content-range" class="smpl">byte-range-resp-spec</a> "/"
    785                             ( <a href="#header.content-range" class="smpl">instance-length</a> / "*" )
     778  <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>
     779                        ( <a href="#header.content-range" class="smpl">byte-range-resp</a> "/" <a href="#header.content-range" class="smpl">unsatisfied-range</a> )
     780
     781  <a href="#header.content-range" class="smpl">byte-range-resp</a>     = <a href="#header.content-range" class="smpl">byte-range</a> "/" ( <a href="#header.content-range" class="smpl">complete-length</a> / "*" )
     782  <a href="#header.content-range" class="smpl">byte-range</a>          = <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> "-" <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a>
     783  <a href="#header.content-range" class="smpl">unsatisfied-range</a>   = "*/" <a href="#header.content-range" class="smpl">complete-length</a>
     784                         
     785  <a href="#header.content-range" class="smpl">complete-length</a>     = 1*<a href="#imported.abnf" class="smpl">DIGIT</a>
    786786 
    787   <a href="#header.content-range" class="smpl">byte-range-resp-spec</a>    = (<a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> "-" <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a>)
    788                           / "*"
    789                          
    790   <a href="#header.content-range" class="smpl">instance-length</a>         = 1*<a href="#imported.abnf" class="smpl">DIGIT</a>
    791  
    792   <a href="#header.content-range" class="smpl">other-content-range-spec</a> = <a href="#range.units" class="smpl">other-range-unit</a> <a href="#imported.abnf" class="smpl">SP</a>
    793                              <a href="#header.content-range" class="smpl">other-range-resp-spec</a>
    794   <a href="#header.content-range" class="smpl">other-range-resp-spec</a>    = *<a href="#imported.abnf" class="smpl">CHAR</a>
    795 </pre><p id="rfc.section.5.2.p.4">The header field <em class="bcp14">SHOULD</em> indicate the total length of the full representation, unless this length is unknown or difficult to determine. The asterisk
    796          "*" character means that the instance-length is unknown at the time when the response was generated.
    797       </p>
    798       <p id="rfc.section.5.2.p.5">Unlike byte-ranges-specifier values (see <a href="#byte.ranges" title="Byte Ranges">Section&nbsp;5.4.1</a>), a byte-range-resp-spec <em class="bcp14">MUST</em> only specify one range, and <em class="bcp14">MUST</em> contain absolute byte positions for both the first and last byte of the range.
    799       </p>
    800       <p id="rfc.section.5.2.p.6">A byte-content-range-spec with a byte-range-resp-spec whose last-byte-pos value is less than its first-byte-pos value, or
    801          whose instance-length value is less than or equal to its last-byte-pos value, is invalid. The recipient of an invalid byte-content-range-spec <em class="bcp14">MUST</em> ignore it and any content transferred along with it.
    802       </p>
    803       <p id="rfc.section.5.2.p.7">In the case of a byte range request: a server sending a response with status code <a href="#status.416" class="smpl">416 (Range Not Satisfiable)</a>  <em class="bcp14">SHOULD</em> send a Content-Range field with a byte-range-resp-spec of "*". The instance-length specifies the current length of the selected
    804          resource. A server <em class="bcp14">MUST NOT</em> generate a a Content-Range field with a byte-range-resp-spec of "*" in a <a href="#status.206" class="smpl">206 (Partial Content)</a> response.
    805       </p>
    806       <p id="rfc.section.5.2.p.8">The "Content-Range" header field has no meaning for status codes that do not explicitly describe its semantic. Currently,
    807          only status codes <a href="#status.206" class="smpl">206 (Partial Content)</a> and <a href="#status.416" class="smpl">416 (Range Not Satisfiable)</a> describe the meaning of this header field.
    808       </p>
    809       <p id="rfc.section.5.2.p.9">Examples of byte-content-range-spec values, assuming that the representation contains a total of 1234 bytes: </p>
     787  <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>
     788  <a href="#header.content-range" class="smpl">other-range-resp</a>    = *<a href="#imported.abnf" class="smpl">CHAR</a>
     789</pre><p id="rfc.section.5.2.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.
     790      </p>
     791      <p id="rfc.section.5.2.p.4">For byte ranges, a sender <em class="bcp14">SHOULD</em> indicate the complete length of the representation from which the range has been extracted unless the complete length is unknown
     792         or difficult to determine. An asterisk character ("*") in place of the complete-length indicates that the representation length
     793         was unknown when the header field was generated.
     794      </p>
     795      <p id="rfc.section.5.2.p.5">A Content-Range field value with a <a href="#header.content-range" class="smpl">byte-range-resp</a> that has a <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> value less than its <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> value, or a <a href="#header.content-range" class="smpl">complete-length</a> value less than or equal to its <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> value, is invalid. The recipient of an invalid <a href="#header.content-range" class="smpl">Content-Range</a>  <em class="bcp14">MUST NOT</em> attempt to recombine the received content with a stored representation.
     796      </p>
     797      <p id="rfc.section.5.2.p.6">A server generating a <a href="#status.206" class="smpl">206 (Partial Content)</a> response to a byte range request <em class="bcp14">MUST</em> send, in each body-part of a multipart response or in the header block of a single part response, a Content-Range header field
     798         containing a <a href="#header.content-range" class="smpl">byte-range-resp</a> value that reflects the corresponding range being sent. The following example would apply when the complete length of the
     799         selected representation is known by the sender to be 1234 bytes:
     800      </p>
     801      <div id="rfc.figure.u.8"></div><pre class="text">  Content-Range: bytes 42-1233/1234
     802</pre><p id="rfc.section.5.2.p.8">or this second example would apply when the complete length is unknown:</p>
     803      <div id="rfc.figure.u.9"></div><pre class="text">  Content-Range: bytes 42-1233/*
     804</pre><p id="rfc.section.5.2.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:
     805      </p>
     806      <div id="rfc.figure.u.10"></div><pre class="text">  Content-Range: bytes */1234
     807</pre><p id="rfc.section.5.2.p.12">The complete-length in a 416 response indicates the current length of the selected representation, which will be known by
     808         the server generating the response because that is how it determined the range to be unsatisfiable.
     809      </p>
     810      <p id="rfc.section.5.2.p.13">The "Content-Range" header field has no meaning for status codes that do not explicitly describe its semantic. For this specification,
     811         only the <a href="#status.206" class="smpl">206 (Partial Content)</a> and <a href="#status.416" class="smpl">416 (Range Not Satisfiable)</a> status codes describe a meaning for Content-Range.
     812      </p>
     813      <p id="rfc.section.5.2.p.14">More examples of Content-Range values, assuming that the representation contains a total of 1234 bytes: </p>
    810814      <ul>
    811815         <li>The first 500 bytes:
    812             <div id="rfc.figure.u.8"></div><pre class="text"> bytes 0-499/1234
     816            <div id="rfc.figure.u.11"></div><pre class="text">  Content-Range: bytes 0-499/1234
    813817</pre> </li>
    814818         <li>The second 500 bytes:
    815             <div id="rfc.figure.u.9"></div><pre class="text"> bytes 500-999/1234
     819            <div id="rfc.figure.u.12"></div><pre class="text">  Content-Range: bytes 500-999/1234
    816820</pre> </li>
    817821         <li>All except for the first 500 bytes:
    818             <div id="rfc.figure.u.10"></div><pre class="text"> bytes 500-1233/1234
     822            <div id="rfc.figure.u.13"></div><pre class="text">  Content-Range: bytes 500-1233/1234
    819823</pre> </li>
    820824         <li>The last 500 bytes:
    821             <div id="rfc.figure.u.11"></div><pre class="text"> bytes 734-1233/1234
     825            <div id="rfc.figure.u.14"></div><pre class="text">  Content-Range: bytes 734-1233/1234
    822826</pre> </li>
    823827      </ul>
     
    831835         is unchanged, send me the part(s) that I am requesting in Range; otherwise, send me the entire representation.
    832836      </p>
    833       <div id="rfc.figure.u.12"></div><pre class="inline"><span id="rfc.iref.g.10"></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>
     837      <div id="rfc.figure.u.15"></div><pre class="inline"><span id="rfc.iref.g.14"></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>
    834838</pre><p id="rfc.section.5.3.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
    835839         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.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>.
     
    856860         </p>
    857861      </div>
    858       <div id="rfc.figure.u.13"></div><pre class="inline"><span id="rfc.iref.g.11"></span><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span><span id="rfc.iref.g.16"></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>
     862      <div id="rfc.figure.u.16"></div><pre class="inline"><span id="rfc.iref.g.15"></span><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>  <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>
    859863  <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> )
    860864  <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> ]
     
    872876      </p>
    873877      <p id="rfc.section.5.4.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>
    874       <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.17"></span><span id="rfc.iref.g.18"></span>  <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> = "-" <a href="#rule.ranges-specifier" class="smpl">suffix-length</a>
     878      <div id="rfc.figure.u.17"></div><pre class="inline"><span id="rfc.iref.g.21"></span><span id="rfc.iref.g.22"></span>  <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> = "-" <a href="#rule.ranges-specifier" class="smpl">suffix-length</a>
    875879  <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> = 1*<a href="#imported.abnf" class="smpl">DIGIT</a>
    876880</pre><p id="rfc.section.5.4.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
     
    887891      <ul>
    888892         <li>The first 500 bytes (byte offsets 0-499, inclusive):
    889             <div id="rfc.figure.u.15"></div><pre class="text">  bytes=0-499
     893            <div id="rfc.figure.u.18"></div><pre class="text">  bytes=0-499
    890894</pre> </li>
    891895         <li>The second 500 bytes (byte offsets 500-999, inclusive):
    892             <div id="rfc.figure.u.16"></div><pre class="text">  bytes=500-999
     896            <div id="rfc.figure.u.19"></div><pre class="text">  bytes=500-999
    893897</pre> </li>
    894898         <li>The final 500 bytes (byte offsets 9500-9999, inclusive):
    895             <div id="rfc.figure.u.17"></div><pre class="text">  bytes=-500
    896 </pre> Or: <div id="rfc.figure.u.18"></div><pre class="text">  bytes=9500-
     899            <div id="rfc.figure.u.20"></div><pre class="text">  bytes=-500
     900</pre> Or: <div id="rfc.figure.u.21"></div><pre class="text">  bytes=9500-
    897901</pre> </li>
    898902         <li>The first and last bytes only (bytes 0 and 9999):
    899             <div id="rfc.figure.u.19"></div><pre class="text">  bytes=0-0,-1
     903            <div id="rfc.figure.u.22"></div><pre class="text">  bytes=0-0,-1
    900904</pre> </li>
    901905         <li>Several legal but not canonical specifications of the second 500 bytes (byte offsets 500-999, inclusive):
    902             <div id="rfc.figure.u.20"></div><pre class="text">  bytes=500-600,601-999
     906            <div id="rfc.figure.u.23"></div><pre class="text">  bytes=500-600,601-999
    903907  bytes=500-700,601-999
    904908</pre> </li>
     
    908912         of the selected representation data in a successful response, rather than the entire representation data.
    909913      </p>
    910       <div id="rfc.figure.u.21"></div><pre class="inline"><span id="rfc.iref.g.19"></span>  <a href="#range.retrieval.requests" class="smpl">Range</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> / <a href="#range.retrieval.requests" class="smpl">other-ranges-specifier</a>
     914      <div id="rfc.figure.u.24"></div><pre class="inline"><span id="rfc.iref.g.23"></span>  <a href="#range.retrieval.requests" class="smpl">Range</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> / <a href="#range.retrieval.requests" class="smpl">other-ranges-specifier</a>
    911915  <a href="#range.retrieval.requests" class="smpl">other-ranges-specifier</a> = <a href="#range.units" class="smpl">other-range-unit</a> "=" <a href="#range.retrieval.requests" class="smpl">other-range-set</a>
    912916  <a href="#range.retrieval.requests" class="smpl">other-range-set</a> = 1*<a href="#imported.abnf" class="smpl">CHAR</a>
     
    915919         server <em class="bcp14">MUST</em> ignore a Range header field received with a request method other than GET.
    916920      </p>
    917       <p id="rfc.section.5.4.2.p.4">The Range header field is evaluated after evaluating the preconditions of <a href="#Part4" id="rfc.xref.Part4.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a> and only if the result of their evaluation is leading toward a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response. In other words, Range is ignored when a conditional GET would result in a <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response.
    918       </p>
    919       <p id="rfc.section.5.4.2.p.5">The If-Range header field (<a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section&nbsp;5.3</a>) can be used as a precondition to applying the Range header field.
    920       </p>
    921       <p id="rfc.section.5.4.2.p.6">If all of the preconditions are true, the server supports the Range header field for the target resource, the specified range(s)
     921      <p id="rfc.section.5.4.2.p.4">An origin server <em class="bcp14">MUST</em> ignore a <a href="#range.retrieval.requests" class="smpl">Range</a> header field that contains a range unit it does not understand. A proxy <em class="bcp14">MAY</em> either discard a <a href="#range.retrieval.requests" class="smpl">Range</a> header field that contains a range unit it does not understand or pass it to the next inbound server when forwarding the request.
     922      </p>
     923      <p id="rfc.section.5.4.2.p.5">The Range header field is evaluated after evaluating the preconditions of <a href="#Part4" id="rfc.xref.Part4.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a> and only if the result of their evaluation is leading toward a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response. In other words, Range is ignored when a conditional GET would result in a <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a> response.
     924      </p>
     925      <p id="rfc.section.5.4.2.p.6">The If-Range header field (<a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section&nbsp;5.3</a>) can be used as a precondition to applying the Range header field.
     926      </p>
     927      <p id="rfc.section.5.4.2.p.7">If all of the preconditions are true, the server supports the Range header field for the target resource, the specified range(s)
    922928         are syntactically correct (as defined in <a href="#byte.ranges" title="Byte Ranges">Section&nbsp;5.4.1</a>), and at least one of the ranges has a non-empty intersection with the current selected representation extent, then the server <em class="bcp14">MAY</em> respond with a status code of <a href="#status.206" class="smpl">206 (Partial Content)</a> and a payload containing one or more partial representations that correspond to those requested, as defined in <a href="#range.response" title="Responses to a Range Request">Section&nbsp;4</a>.
    923929      </p>
     
    992998                  <td class="left">http</td>
    993999                  <td class="left">standard</td>
    994                   <td class="left"> <a href="#header.range" id="rfc.xref.header.range.5" title="Range">Section&nbsp;5.4</a>
     1000                  <td class="left"> <a href="#header.range" id="rfc.xref.header.range.4" title="Range">Section&nbsp;5.4</a>
    9951001                  </td>
    9961002               </tr>
     
    10001006      <p id="rfc.section.6.2.p.2">The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".</p>
    10011007      <h2 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a>&nbsp;<a id="range.specifier.registration" href="#range.specifier.registration">Range Specifier Registration</a></h2>
    1002       <p id="rfc.section.6.3.p.1">The registration procedure for HTTP Range Specifiers is defined by <a href="#range.specifier.registry" title="Range Specifier Registry">Section&nbsp;2.1</a> of this document.
     1008      <p id="rfc.section.6.3.p.1">The registration procedure for HTTP Range Specifiers is defined by <a href="#range.unit.registry" title="Range Unit Registry">Section&nbsp;2.1</a> of this document.
    10031009      </p>
    10041010      <p id="rfc.section.6.3.p.2">The HTTP Range Specifier Registry shall be created at &lt;<a href="http://www.iana.org/assignments/http-range-specifiers">http://www.iana.org/assignments/http-range-specifiers</a>&gt; and be populated with the registrations below:
     
    11701176         </p>
    11711177      </div>
    1172       <div id="rfc.figure.u.22"></div>
     1178      <div id="rfc.figure.u.25"></div>
    11731179      <p>For example:</p><pre class="text">  HTTP/1.1 206 Partial Content
    11741180  Date: Wed, 15 Nov 1995 06:25:24 GMT
     
    11881194  ...the second range
    11891195  --THIS_STRING_SEPARATES--
    1190 </pre><div id="rfc.figure.u.23"></div>
     1196</pre><div id="rfc.figure.u.26"></div>
    11911197      <p>Another example, using the "exampleunit" range unit:</p>  <pre class="text">  HTTP/1.1 206 Partial Content
    11921198  Date: Tue, 14 Nov 1995 06:25:24 GMT
     
    12251231      <p id="rfc.section.B.p.4">multipart/byteranges can consist of a single part. (<a href="#internet.media.type.multipart.byteranges" title="Internet Media Type multipart/byteranges">Appendix&nbsp;A</a>)
    12261232      </p>
    1227       <p id="rfc.section.B.p.5">This specification introduces a Range Specifier Registry. (<a href="#range.specifier.registry" title="Range Specifier Registry">Section&nbsp;2.1</a>)
     1233      <p id="rfc.section.B.p.5">This specification introduces a Range Specifier Registry. (<a href="#range.unit.registry" title="Range Unit Registry">Section&nbsp;2.1</a>)
    12281234      </p>
    12291235      <h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a id="imported.abnf" href="#imported.abnf">Imported ABNF</a></h1>
     
    12361242      <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>:
    12371243      </p>
    1238       <div id="rfc.figure.u.24"></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;
     1244      <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;
    12391245  <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;
    12401246</pre><p id="rfc.section.C.p.5">The rules below are defined in other parts:</p>
    1241       <div id="rfc.figure.u.25"></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;
     1247      <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;
    12421248  <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;
    12431249</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>
    1244       <div id="rfc.figure.u.26"></div> <pre class="inline"><a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = acceptable-ranges
    1245 
    1246 <a href="#header.content-range" class="smpl">Content-Range</a> = byte-content-range-spec / other-content-range-spec
     1250      <div id="rfc.figure.u.29"></div> <pre class="inline"><a href="#header.accept-ranges" class="smpl">Accept-Ranges</a> = acceptable-ranges
     1251
     1252<a href="#header.content-range" class="smpl">Content-Range</a> = byte-content-range / other-content-range
    12471253
    12481254<a href="#imported.abnf" class="smpl">HTTP-date</a> = &lt;HTTP-date, defined in [Part2], Section 7.1.1.1&gt;
     
    12571263 range-unit ] ) ) / "none"
    12581264
    1259 <a href="#header.content-range" class="smpl">byte-content-range-spec</a> = bytes-unit SP byte-range-resp-spec "/" (
    1260  instance-length / "*" )
    1261 <a href="#header.content-range" class="smpl">byte-range-resp-spec</a> = ( first-byte-pos "-" last-byte-pos ) / "*"
     1265<a href="#header.content-range" class="smpl">byte-content-range</a> = bytes-unit SP ( byte-range-resp "/"
     1266 unsatisfied-range )
     1267<a href="#header.content-range" class="smpl">byte-range</a> = first-byte-pos "-" last-byte-pos
     1268<a href="#header.content-range" class="smpl">byte-range-resp</a> = byte-range "/" ( complete-length / "*" )
    12621269<a href="#rule.ranges-specifier" class="smpl">byte-range-set</a> = *( "," OWS ) ( byte-range-spec /
    12631270 suffix-byte-range-spec ) *( OWS "," [ OWS ( byte-range-spec /
     
    12671274<a href="#range.units" class="smpl">bytes-unit</a> = "bytes"
    12681275
     1276<a href="#header.content-range" class="smpl">complete-length</a> = 1*DIGIT
     1277
    12691278<a href="#imported.abnf" class="smpl">entity-tag</a> = &lt;entity-tag, defined in [Part4], Section 2.3&gt;
    12701279
    12711280<a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> = 1*DIGIT
    12721281
    1273 <a href="#header.content-range" class="smpl">instance-length</a> = 1*DIGIT
    1274 
    12751282<a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> = 1*DIGIT
    12761283
    1277 <a href="#header.content-range" class="smpl">other-content-range-spec</a> = other-range-unit SP other-range-resp-spec
    1278 <a href="#header.content-range" class="smpl">other-range-resp-spec</a> = *CHAR
     1284<a href="#header.content-range" class="smpl">other-content-range</a> = other-range-unit SP other-range-resp
     1285<a href="#header.content-range" class="smpl">other-range-resp</a> = *CHAR
    12791286<a href="#range.retrieval.requests" class="smpl">other-range-set</a> = 1*CHAR
    12801287<a href="#range.units" class="smpl">other-range-unit</a> = token
     
    12871294
    12881295<a href="#imported.abnf" class="smpl">token</a> = &lt;token, defined in [Part1], Section 3.2.6&gt;
     1296
     1297<a href="#header.content-range" class="smpl">unsatisfied-range</a> = "*/" complete-length
    12891298</pre> <h1 id="rfc.section.E"><a href="#rfc.section.E">E.</a>&nbsp;<a id="change.log" href="#change.log">Change Log (to be removed by RFC Editor before publication)</a></h1>
    12901299      <p id="rfc.section.E.p.1">Changes up to the first Working Group Last Call draft are summarized in &lt;<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-19#appendix-D">http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-19#appendix-D</a>&gt;.
     
    13421351                        <li><tt>Accept-Ranges</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.4"><b>5.1</b></a></li>
    13431352                        <li><tt>acceptable-ranges</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.5"><b>5.1</b></a></li>
    1344                         <li><tt>byte-content-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.7"><b>5.2</b></a></li>
    1345                         <li><tt>byte-range-resp-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.8"><b>5.2</b></a></li>
    1346                         <li><tt>byte-range-set</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.13"><b>5.4.1</b></a></li>
    1347                         <li><tt>byte-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.14"><b>5.4.1</b></a></li>
    1348                         <li><tt>byte-ranges-specifier</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.12"><b>5.4.1</b></a></li>
     1353                        <li><tt>byte-content-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.7"><b>5.2</b></a></li>
     1354                        <li><tt>byte-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.9"><b>5.2</b></a></li>
     1355                        <li><tt>byte-range-resp</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.8"><b>5.2</b></a></li>
     1356                        <li><tt>byte-range-set</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.17"><b>5.4.1</b></a></li>
     1357                        <li><tt>byte-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.18"><b>5.4.1</b></a></li>
     1358                        <li><tt>byte-ranges-specifier</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.16"><b>5.4.1</b></a></li>
    13491359                        <li><tt>bytes-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.2"><b>2</b></a></li>
     1360                        <li><tt>complete-length</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.13"><b>5.2</b></a></li>
    13501361                        <li><tt>Content-Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.6"><b>5.2</b></a></li>
    1351                         <li><tt>first-byte-pos</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.15"><b>5.4.1</b></a></li>
    1352                         <li><tt>If-Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.10"><b>5.3</b></a></li>
    1353                         <li><tt>instance-length</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.9"><b>5.2</b></a></li>
    1354                         <li><tt>last-byte-pos</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.16"><b>5.4.1</b></a></li>
     1362                        <li><tt>first-byte-pos</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.19"><b>5.4.1</b></a></li>
     1363                        <li><tt>If-Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.14"><b>5.3</b></a></li>
     1364                        <li><tt>last-byte-pos</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.20"><b>5.4.1</b></a></li>
     1365                        <li><tt>other-content-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.11"><b>5.2</b></a></li>
     1366                        <li><tt>other-range-resp</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.12"><b>5.2</b></a></li>
    13551367                        <li><tt>other-range-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.3"><b>2</b></a></li>
    1356                         <li><tt>Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.19"><b>5.4.2</b></a></li>
     1368                        <li><tt>Range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.23"><b>5.4.2</b></a></li>
    13571369                        <li><tt>range-unit</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.1"><b>2</b></a></li>
    1358                         <li><tt>ranges-specifier</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.11"><b>5.4.1</b></a></li>
    1359                         <li><tt>suffix-byte-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.17"><b>5.4.1</b></a></li>
    1360                         <li><tt>suffix-length</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.18"><b>5.4.1</b></a></li>
     1370                        <li><tt>ranges-specifier</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.15"><b>5.4.1</b></a></li>
     1371                        <li><tt>suffix-byte-range-spec</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.21"><b>5.4.1</b></a></li>
     1372                        <li><tt>suffix-length</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.22"><b>5.4.1</b></a></li>
     1373                        <li><tt>unsatisfied-range</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.10"><b>5.2</b></a></li>
    13611374                     </ul>
    13621375                  </li>
     
    14031416            </li>
    14041417            <li><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul>
    1405                   <li>Range header field&nbsp;&nbsp;<a href="#rfc.xref.header.range.1">2</a>, <a href="#rfc.xref.header.range.2">2</a>, <a href="#rfc.xref.header.range.3">3.1</a>, <a href="#rfc.xref.header.range.4">3.2</a>, <a href="#rfc.iref.r.1"><b>5.4</b></a>, <a href="#rfc.xref.header.range.5">6.2</a></li>
     1418                  <li>Range header field&nbsp;&nbsp;<a href="#rfc.xref.header.range.1">2</a>, <a href="#rfc.xref.header.range.2">3.1</a>, <a href="#rfc.xref.header.range.3">3.2</a>, <a href="#rfc.iref.r.1"><b>5.4</b></a>, <a href="#rfc.xref.header.range.4">6.2</a></li>
    14061419                  <li><em>RFC2046</em>&nbsp;&nbsp;<a href="#RFC2046"><b>9.1</b></a>, <a href="#rfc.xref.RFC2046.1">A</a>, <a href="#rfc.xref.RFC2046.2">A</a><ul>
    14071420                        <li><em>Section 5.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2046.1">A</a></li>
Note: See TracChangeset for help on using the changeset viewer.