Ignore:
Timestamp:
23/01/13 10:21:37 (7 years ago)
Author:
fielding@…
Message:

(editorial) more cleanup in p5

File:
1 edited

Legend:

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

    r2147 r2150  
    449449  }
    450450  @bottom-center {
    451        content: "Expires July 24, 2013";
     451       content: "Expires July 27, 2013";
    452452  }
    453453  @bottom-right {
     
    492492      <meta name="dct.creator" content="Reschke, J. F.">
    493493      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p5-range-latest">
    494       <meta name="dct.issued" scheme="ISO8601" content="2013-01-20">
     494      <meta name="dct.issued" scheme="ISO8601" content="2013-01-23">
    495495      <meta name="dct.replaces" content="urn:ietf:rfc:2616">
    496496      <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypertext information systems. This document defines range requests and the rules for constructing and combining responses to those requests.">
     
    518518            </tr>
    519519            <tr>
    520                <td class="left">Expires: July 24, 2013</td>
     520               <td class="left">Expires: July 27, 2013</td>
    521521               <td class="right">J. Reschke, Editor</td>
    522522            </tr>
     
    527527            <tr>
    528528               <td class="left"></td>
    529                <td class="right">January 20, 2013</td>
     529               <td class="right">January 23, 2013</td>
    530530            </tr>
    531531         </tbody>
     
    552552         in progress”.
    553553      </p>
    554       <p>This Internet-Draft will expire on July 24, 2013.</p>
     554      <p>This Internet-Draft will expire on July 27, 2013.</p>
    555555      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
    556556      <p>Copyright © 2013 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
     
    670670  <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a>  = 1*<a href="#imported.abnf" class="smpl">DIGIT</a>
    671671  <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a>   = 1*<a href="#imported.abnf" class="smpl">DIGIT</a>
    672 </pre><p id="rfc.section.2.1.p.5">The first-byte-pos value in a byte-range-spec gives the byte-offset of the first byte in a range. The last-byte-pos value
    673          gives the byte-offset of the last byte in the range; that is, the byte positions specified are inclusive. Byte offsets start
    674          at zero.
    675       </p>
    676       <p id="rfc.section.2.1.p.6">Examples of byte-ranges-specifier values: </p>
     672</pre><p id="rfc.section.2.1.p.5">The <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> value in a <a href="#rule.ranges-specifier" class="smpl">byte-range-spec</a> gives the byte-offset of the first byte in a range. The <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> value gives the byte-offset of the last byte in the range; that is, the byte positions specified are inclusive. Byte offsets
     673         start at zero.
     674      </p>
     675      <p id="rfc.section.2.1.p.6">Examples of <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a> values:
     676      </p>
    677677      <ul>
    678678         <li>The first 500 bytes (byte offsets 0-499, inclusive):
     
    683683</pre> </li>
    684684      </ul>
    685       <p id="rfc.section.2.1.p.7">If the last-byte-pos value is present, it <em class="bcp14">MUST</em> be greater than or equal to the first-byte-pos in that byte-range-spec, or the byte-range-spec is syntactically invalid. The
    686          recipient of a byte-range-set that includes one or more syntactically invalid byte-range-spec values <em class="bcp14">MUST</em> ignore the header field that includes that byte-range-set.
    687       </p>
    688       <p id="rfc.section.2.1.p.8">If the last-byte-pos value is absent, or if the value is greater than or equal to the current length of the representation
    689          data, last-byte-pos is taken to be equal to one less than the current length of the representation in bytes.
    690       </p>
    691       <p id="rfc.section.2.1.p.9">By its choice of last-byte-pos, a client can limit the number of bytes retrieved without knowing the size of the representation.</p>
     685      <p id="rfc.section.2.1.p.7">A <a href="#rule.ranges-specifier" class="smpl">byte-range-spec</a> is invalid if the <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> value is present and less than the <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a>.
     686      </p>
     687      <p id="rfc.section.2.1.p.8">A client can limit the number of bytes requested without knowing the size of the selected representation. If the <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> value is absent, or if the value is greater than or equal to the current length of the representation data, the byte range
     688         is interpreted as the remainder of the representation (i.e., the server replaces the value of <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a> with a value that is one less than the current length of the selected representation).
     689      </p>
     690      <p id="rfc.section.2.1.p.9">A client can request the last N bytes of the selected representation using a <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a>.
     691      </p>
    692692      <div id="rfc.figure.u.6"></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>
    693693  <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> = 1*<a href="#imported.abnf" class="smpl">DIGIT</a>
    694 </pre><p id="rfc.section.2.1.p.11">A suffix-byte-range-spec is used to specify the suffix of the representation data, of a length given by the suffix-length
    695          value. (That is, this form specifies the last N bytes of a representation.) If the representation is shorter than the specified
    696          suffix-length, the entire representation is used. For example (assuming a representation of length 10000):
     694</pre><p id="rfc.section.2.1.p.11">If the selected representation is shorter than the specified <a href="#rule.ranges-specifier" class="smpl">suffix-length</a>, the entire representation is used. For example (assuming a representation of length 10000):
    697695      </p>
    698696      <ul>
     
    709707</pre> </li>
    710708      </ul>
    711       <p id="rfc.section.2.1.p.12">If a syntactically valid byte-range-set includes at least one byte-range-spec whose first-byte-pos is less than the current
    712          length of the representation, or at least one suffix-byte-range-spec with a non-zero suffix-length, then the byte-range-set
    713          is satisfiable. Otherwise, the byte-range-set is unsatisfiable. If the byte-range-set is unsatisfiable, the server <em class="bcp14">SHOULD</em> send a response with a <a href="#status.416" class="smpl">416 (Range Not Satisfiable)</a> status code. Otherwise, the server <em class="bcp14">SHOULD</em> send a response with a <a href="#status.206" class="smpl">206 (Partial Content)</a> status code containing the satisfiable ranges of the representation.
    714       </p>
    715       <p id="rfc.section.2.1.p.13">In the byte range syntax, <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a>, <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a>, and <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> are expressed as decimal number of octets. Since there is no predefined limit to the length of a payload, recipients <em class="bcp14">SHOULD</em> anticipate potentially large decimal numerals and prevent parsing errors due to integer conversion overflows.
     709      <p id="rfc.section.2.1.p.12">If a valid <a href="#rule.ranges-specifier" class="smpl">byte-range-set</a> includes at least one <a href="#rule.ranges-specifier" class="smpl">byte-range-spec</a> with a <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a> that is less than the current length of the representation, or at least one <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> with a non-zero <a href="#rule.ranges-specifier" class="smpl">suffix-length</a>, then the <a href="#rule.ranges-specifier" class="smpl">byte-range-set</a> is satisfiable. Otherwise, the <a href="#rule.ranges-specifier" class="smpl">byte-range-set</a> is unsatisfiable.
     710      </p>
     711      <p id="rfc.section.2.1.p.13">In the byte range syntax, <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a>, <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a>, and <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> are expressed as decimal number of octets. Since there is no predefined limit to the length of a payload, recipients ought
     712         to anticipate potentially large decimal numerals and prevent parsing errors due to integer conversion overflows.
    716713      </p>
    717714      <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>
     
    721718</pre><div id="rfc.iref.a.1"></div>
    722719      <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>
    723       <p id="rfc.section.2.3.p.1">The "Accept-Ranges" header field allows a resource to indicate its acceptance of range requests.</p>
     720      <p id="rfc.section.2.3.p.1">The "Accept-Ranges" header field allows a server to indicate that it supports range requests for the target resource.</p>
    724721      <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>
    725722  <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a> = 1#<a href="#range.units" class="smpl">range-unit</a> / "none"
    726 </pre><p id="rfc.section.2.3.p.3">Origin servers that accept byte-range requests <em class="bcp14">MAY</em> send
     723</pre><p id="rfc.section.2.3.p.3">Origin servers that support byte-range requests <em class="bcp14">MAY</em> send
    727724      </p>
    728725      <div id="rfc.figure.u.13"></div><pre class="text">  Accept-Ranges: bytes
    729726</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>.
    730727      </p>
    731       <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
     728      <p id="rfc.section.2.3.p.6">Servers that do not support any kind of range request for the target resource resource <em class="bcp14">MAY</em> send
    732729      </p>
    733730      <div id="rfc.figure.u.14"></div><pre class="text">  Accept-Ranges: none
     
    736733      <div id="rfc.iref.r.1"></div>
    737734      <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a id="header.range" href="#header.range">Range</a></h2>
    738       <p id="rfc.section.3.1.p.1">The "Range" header field on a GET request modifies the method semantics to request transfer of only one or more sub-ranges
    739          of the selected representation data in a successful response, rather than the entire representation data.
     735      <p id="rfc.section.3.1.p.1">The "Range" header field on a GET request modifies the method semantics to request transfer of only one or more subranges
     736         of the selected representation data, rather than the entire selected representation data.
    740737      </p>
    741738      <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>
     
    746743         server <em class="bcp14">MUST</em> ignore a Range header field received with a request method other than GET.
    747744      </p>
    748       <p id="rfc.section.3.1.p.4">An origin server <em class="bcp14">MUST</em> ignore a <a href="#header.range" 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="#header.range" 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.
     745      <p id="rfc.section.3.1.p.4">An origin server <em class="bcp14">MUST</em> ignore a Range header field that contains a range unit it does not understand. A proxy <em class="bcp14">MAY</em> either discard a Range header field that contains a range unit it does not understand or pass it to the next inbound server
     746         when forwarding the request.
    749747      </p>
    750748      <p id="rfc.section.3.1.p.5">The Range header field is evaluated after evaluating the preconditions of <a href="#Part4" id="rfc.xref.Part4.1"><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.
     
    752750      <p id="rfc.section.3.1.p.6">The If-Range header field (<a href="#header.if-range" id="rfc.xref.header.if-range.1" title="If-Range">Section&nbsp;3.2</a>) can be used as a precondition to applying the Range header field.
    753751      </p>
    754       <p id="rfc.section.3.1.p.7">If all of the preconditions are true, the server supports the Range header field for the target resource, the specified range(s)
    755          are syntactically correct (as defined in <a href="#byte.ranges" title="Byte Ranges">Section&nbsp;2.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>.
     752      <p id="rfc.section.3.1.p.7">If all of the preconditions are true, the server supports the Range header field for the target resource, and the specified
     753         range(s) are valid and satisfiable (as defined in <a href="#byte.ranges" title="Byte Ranges">Section&nbsp;2.1</a>), the server <em class="bcp14">SHOULD</em> send a <a href="#status.206" class="smpl">206 (Partial Content)</a> response with a payload containing one or more partial representations that correspond to the satisfiable ranges requested,
     754         as defined in <a href="#range.response" title="Responses to a Range Request">Section&nbsp;4</a>.
     755      </p>
     756      <p id="rfc.section.3.1.p.8">If all of the preconditions are true, the server supports the Range header field for the target resource, and the specified
     757         range(s) are invalid or unsatisfiable, the server <em class="bcp14">SHOULD</em> send a <a href="#status.416" class="smpl">416 (Range Not Satisfiable)</a> response.
    756758      </p>
    757759      <div id="rfc.iref.i.1"></div>
     
    771773         validator, if the date value is not 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>. (A server can distinguish between a valid HTTP-date and any form of entity-tag by examining the first two characters.)
    772774      </p>
    773       <p id="rfc.section.3.2.p.6">The If-Range header field <em class="bcp14">SHOULD</em> only be sent by clients together with a Range header field. The If-Range header field <em class="bcp14">MUST</em> be ignored if it is received in a request that does not include a Range header field. The If-Range header field <em class="bcp14">MUST</em> be ignored by a server that does not support the sub-range operation.
     775      <p id="rfc.section.3.2.p.6">A client <em class="bcp14">MUST NOT</em> generate an If-Range header field in a request that does not contain a <a href="#header.range" class="smpl">Range</a> header field. A server <em class="bcp14">MUST</em> ignore an If-Range header field received in a request that does not contain a <a href="#header.range" class="smpl">Range</a> header field. An origin server <em class="bcp14">MUST</em> ignore an If-Range header field received in a request for a target resource that does not support Range requests.
    774776      </p>
    775777      <p id="rfc.section.3.2.p.7">If the validator given in the If-Range header field matches the current validator for the selected representation of the target
    776          resource, then the server <em class="bcp14">SHOULD</em> send the specified sub-range of the representation using a <a href="#status.206" class="smpl">206 (Partial Content)</a> response. If the validator does not match, then the server <em class="bcp14">SHOULD</em> send the entire representation using a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response.
     778         resource, then the server <em class="bcp14">SHOULD</em> process the Range header field as requested. If the validator does not match, then the server <em class="bcp14">MUST</em> ignore the <a href="#header.range" class="smpl">Range</a> header field.
    777779      </p>
    778780      <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a id="range.response" href="#range.response">Responses to a Range Request</a></h1>
Note: See TracChangeset for help on using the changeset viewer.