Ignore:
Timestamp:
Mar 2, 2008, 9:21:57 AM (12 years ago)
Author:
julian.reschke@…
Message:

add linking between ABNF rules (does not affect TXT version), relates to #36.

File:
1 edited

Legend:

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

    r228 r229  
    554554      <p id="rfc.section.2.p.1">This specification uses the ABNF syntax defined in <a href="p1-messaging.html#notation.abnf" title="Augmented BNF">Section 2.1</a> of <a href="#Part1" id="rfc.xref.Part1.1"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> and the core rules defined in <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 2.2</a> of <a href="#Part1" id="rfc.xref.Part1.2"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>: <span class="comment">[abnf.dep: ABNF syntax and basic rules will be adopted from RFC 5234, see &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/36">http://tools.ietf.org/wg/httpbis/trac/ticket/36</a>&gt;.]</span>
    555555      </p>
    556       <div id="rfc.figure.u.1"></div><pre class="inline">  DIGIT      = &lt;DIGIT, defined in <a href="#Part1" id="rfc.xref.Part1.3"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 2.2</a>&gt;
    557   SP         = &lt;SP, defined in <a href="#Part1" id="rfc.xref.Part1.4"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 2.2</a>&gt;
    558 </pre><div id="rfc.figure.u.2"></div><pre class="inline">  token      = &lt;token, defined in <a href="#Part1" id="rfc.xref.Part1.5"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 2.2</a>&gt;
     556      <div id="rfc.figure.u.1"></div><pre class="inline">  <a href="#notation" class="smpl">DIGIT</a>      = &lt;DIGIT, defined in <a href="#Part1" id="rfc.xref.Part1.3"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 2.2</a>&gt;
     557  <a href="#notation" class="smpl">SP</a>         = &lt;SP, defined in <a href="#Part1" id="rfc.xref.Part1.4"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 2.2</a>&gt;
     558</pre><div id="rfc.figure.u.2"></div><pre class="inline">  <a href="#notation" class="smpl">token</a>      = &lt;token, defined in <a href="#Part1" id="rfc.xref.Part1.5"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 2.2</a>&gt;
    559559</pre><div id="abnf.dependencies">
    560          <p id="rfc.section.2.p.4">The ABNF rules below are defined in other parts:</p>
     560         <p id="rfc.section.2.p.4">    The ABNF rules below are defined in other parts:</p>
    561561      </div>
    562       <div id="rfc.figure.u.3"></div><pre class="inline">  HTTP-date  = &lt;HTTP-date, defined in <a href="#Part1" id="rfc.xref.Part1.6"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#full.date" title="Full Date">Section 3.3.1</a>&gt;
    563 </pre><div id="rfc.figure.u.4"></div><pre class="inline">  entity-tag = &lt;entity-tag, defined in <a href="#Part4" id="rfc.xref.Part4.1"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>, <a href="p4-conditional.html#entity.tags" title="Entity Tags">Section 3</a>&gt;
     562      <div id="rfc.figure.u.3"></div><pre class="inline">  <a href="#abnf.dependencies" class="smpl">HTTP-date</a>  = &lt;HTTP-date, defined in <a href="#Part1" id="rfc.xref.Part1.6"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#full.date" title="Full Date">Section 3.3.1</a>&gt;
     563</pre><div id="rfc.figure.u.4"></div><pre class="inline">  <a href="#abnf.dependencies" class="smpl">entity-tag</a> = &lt;entity-tag, defined in <a href="#Part4" id="rfc.xref.Part4.1"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>, <a href="p4-conditional.html#entity.tags" title="Entity Tags">Section 3</a>&gt;
    564564</pre><h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a id="range.units" href="#range.units">Range Units</a></h1>
    565565      <p id="rfc.section.3.p.1">HTTP/1.1 allows a client to request that only part (a range of) the response entity be included within the response. HTTP/1.1
    566566         uses range units in the Range (<a href="#header.range" id="rfc.xref.header.range.1" title="Range">Section&nbsp;6.4</a>) and Content-Range (<a href="#header.content-range" id="rfc.xref.header.content-range.1" title="Content-Range">Section&nbsp;6.2</a>) header fields. An entity can be broken down into subranges according to various structural units.
    567567      </p>
    568       <div id="rfc.figure.u.5"></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>  range-unit       = bytes-unit | other-range-unit
    569   bytes-unit       = "bytes"
    570   other-range-unit = token
     568      <div id="rfc.figure.u.5"></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>
     569  <a href="#range.units" class="smpl">bytes-unit</a>       = "bytes"
     570  <a href="#range.units" class="smpl">other-range-unit</a> = <a href="#notation" class="smpl">token</a>
    571571</pre><p id="rfc.section.3.p.3">The only range unit defined by HTTP/1.1 is "bytes". HTTP/1.1 implementations <em class="bcp14">MAY</em> ignore ranges specified using other units.
    572572      </p>
     
    631631      <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;<a id="header.accept-ranges" href="#header.accept-ranges">Accept-Ranges</a></h2>
    632632      <p id="rfc.section.6.1.p.1">The Accept-Ranges response-header field allows the server to indicate its acceptance of range requests for a resource:</p>
    633       <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span>  Accept-Ranges     = "Accept-Ranges" ":" acceptable-ranges
    634   acceptable-ranges = 1#range-unit | "none"
     633      <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span>  <a href="#header.accept-ranges" class="smpl">Accept-Ranges</a>     = "Accept-Ranges" ":" <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a>
     634  <a href="#header.accept-ranges" class="smpl">acceptable-ranges</a> = 1#<a href="#range.units" class="smpl">range-unit</a> | "none"
    635635</pre><p id="rfc.section.6.1.p.3">Origin servers that accept byte-range requests <em class="bcp14">MAY</em> send
    636636      </p>
     
    648648         should be applied. Range units are defined in <a href="#range.units" title="Range Units">Section&nbsp;3</a>.
    649649      </p>
    650       <div id="rfc.figure.u.9"></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>  Content-Range = "Content-Range" ":" content-range-spec
     650      <div id="rfc.figure.u.9"></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>  <a href="#header.content-range" class="smpl">Content-Range</a> = "Content-Range" ":" <a href="#header.content-range" class="smpl">content-range-spec</a>
    651651 
    652   content-range-spec      = byte-content-range-spec
    653   byte-content-range-spec = bytes-unit SP
    654                             byte-range-resp-spec "/"
    655                             ( instance-length | "*" )
     652  <a href="#header.content-range" class="smpl">content-range-spec</a>      = <a href="#header.content-range" class="smpl">byte-content-range-spec</a>
     653  <a href="#header.content-range" class="smpl">byte-content-range-spec</a> = <a href="#range.units" class="smpl">bytes-unit</a> <a href="#notation" class="smpl">SP</a>
     654                            <a href="#header.content-range" class="smpl">byte-range-resp-spec</a> "/"
     655                            ( <a href="#header.content-range" class="smpl">instance-length</a> | "*" )
    656656 
    657   byte-range-resp-spec = (first-byte-pos "-" last-byte-pos)
     657  <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>)
    658658                                 | "*"
    659   instance-length           = 1*DIGIT
     659  <a href="#header.content-range" class="smpl">instance-length</a>           = 1*<a href="#notation" class="smpl">DIGIT</a>
    660660</pre><p id="rfc.section.6.2.p.3">The header <em class="bcp14">SHOULD</em> indicate the total length of the full entity-body, unless this length is unknown or difficult to determine. The asterisk "*"
    661661         character means that the instance-length is unknown at the time when the response was generated.
     
    725725         send me the part(s) that I am missing; otherwise, send me the entire new entity'.
    726726      </p>
    727       <div id="rfc.figure.u.15"></div><pre class="inline"><span id="rfc.iref.g.11"></span>  If-Range = "If-Range" ":" ( entity-tag | HTTP-date )
     727      <div id="rfc.figure.u.15"></div><pre class="inline"><span id="rfc.iref.g.11"></span>  <a href="#header.if-range" class="smpl">If-Range</a> = "If-Range" ":" ( <a href="#abnf.dependencies" class="smpl">entity-tag</a> | <a href="#abnf.dependencies" class="smpl">HTTP-date</a> )
    728728</pre><p id="rfc.section.6.3.p.4">If the client has no entity tag for an entity, but does have a Last-Modified date, it <em class="bcp14">MAY</em> use that date in an If-Range header. (The server can distinguish between a valid HTTP-date and any form of entity-tag by examining
    729729         no more than two characters.) The If-Range header <em class="bcp14">SHOULD</em> only be used together with a Range header, and <em class="bcp14">MUST</em> be ignored if the request does not include a Range header, or if the server does not support the sub-range operation.
     
    740740      </p>
    741741      <p id="rfc.section.6.4.1.p.2">Byte range specifications in HTTP apply to the sequence of bytes in the entity-body (not necessarily the same as the message-body).</p>
    742       <p id="rfc.section.6.4.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 entity.
    743       </p>
    744       <div id="rfc.figure.u.16"></div><pre class="inline"><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><span id="rfc.iref.g.17"></span>  ranges-specifier = byte-ranges-specifier
    745   byte-ranges-specifier = bytes-unit "=" byte-range-set
    746   byte-range-set  = 1#( byte-range-spec | suffix-byte-range-spec )
    747   byte-range-spec = first-byte-pos "-" [last-byte-pos]
    748   first-byte-pos  = 1*DIGIT
    749   last-byte-pos   = 1*DIGIT
     742      <div id="rule.ranges-specifier">
     743         <p id="rfc.section.6.4.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 entity.
     744         </p>
     745      </div>
     746      <div id="rfc.figure.u.16"></div><pre class="inline"><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><span id="rfc.iref.g.17"></span>  <a href="#rule.ranges-specifier" class="smpl">ranges-specifier</a> = <a href="#rule.ranges-specifier" class="smpl">byte-ranges-specifier</a>
     747  <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>
     748  <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> )
     749  <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>]
     750  <a href="#rule.ranges-specifier" class="smpl">first-byte-pos</a>  = 1*<a href="#notation" class="smpl">DIGIT</a>
     751  <a href="#rule.ranges-specifier" class="smpl">last-byte-pos</a>   = 1*<a href="#notation" class="smpl">DIGIT</a>
    750752</pre><p id="rfc.section.6.4.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
    751753         gives the byte-offset of the last byte in the range; that is, the byte positions specified are inclusive. Byte offsets start
     
    759761      </p>
    760762      <p id="rfc.section.6.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 entity.</p>
    761       <div id="rfc.figure.u.17"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span>  suffix-byte-range-spec = "-" suffix-length
    762   suffix-length = 1*DIGIT
     763      <div id="rfc.figure.u.17"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span>  <a href="#rule.ranges-specifier" class="smpl">suffix-byte-range-spec</a> = "-" <a href="#rule.ranges-specifier" class="smpl">suffix-length</a>
     764  <a href="#rule.ranges-specifier" class="smpl">suffix-length</a> = 1*<a href="#notation" class="smpl">DIGIT</a>
    763765</pre><p id="rfc.section.6.4.1.p.10">A suffix-byte-range-spec is used to specify the suffix of the entity-body, of a length given by the suffix-length value. (That
    764766         is, this form specifies the last N bytes of an entity-body.) If the entity is shorter than the specified suffix-length, the
     
    783785         to the entity returned as the result of the request:
    784786      </p>
    785       <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.20"></span>  Range = "Range" ":" ranges-specifier
     787      <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.20"></span>  <a href="#range.retrieval.requests" class="smpl">Range</a> = "Range" ":" <a href="#rule.ranges-specifier" class="smpl">ranges-specifier</a>
    786788</pre><p id="rfc.section.6.4.2.p.3">A server <em class="bcp14">MAY</em> ignore the Range header. However, HTTP/1.1 origin servers and intermediate caches ought to support byte ranges when possible,
    787789         since Range supports efficient recovery from partially failed transfers, and supports efficient partial retrieval of large
Note: See TracChangeset for help on using the changeset viewer.