Ignore:
Timestamp:
Sep 7, 2010, 4:46:12 AM (9 years ago)
Author:
julian.reschke@…
Message:

Uniform use of 'header field' (see #234)

File:
1 edited

Legend:

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

    r981 r994  
    400400      <meta name="dct.creator" content="Reschke, J. F.">
    401401      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p5-range-latest">
    402       <meta name="dct.issued" scheme="ISO8601" content="2010-09-01">
     402      <meta name="dct.issued" scheme="ISO8601" content="2010-09-07">
    403403      <meta name="dct.replaces" content="urn:ietf:rfc:2616">
    404404      <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 5 of the seven-part specification that defines the protocol referred to as &#34;HTTP/1.1&#34; and, taken together, obsoletes RFC 2616. Part 5 defines range-specific requests and the rules for constructing and combining responses to those requests.">
     
    426426            </tr>
    427427            <tr>
    428                <td class="left">Expires: March 5, 2011</td>
     428               <td class="left">Expires: March 11, 2011</td>
    429429               <td class="right">J. Mogul</td>
    430430            </tr>
     
    483483            <tr>
    484484               <td class="left"></td>
    485                <td class="right">September 1, 2010</td>
     485               <td class="right">September 7, 2010</td>
    486486            </tr>
    487487         </tbody>
     
    509509         in progress”.
    510510      </p>
    511       <p>This Internet-Draft will expire on March 5, 2011.</p>
     511      <p>This Internet-Draft will expire on March 11, 2011.</p>
    512512      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
    513513      <p>Copyright © 2010 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
     
    645645         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>.
    646646      </p>
    647       <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 Range header (<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.
     647      <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 Range 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.
    648648      </p>
    649649      <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>
     
    679679      <p id="rfc.section.3.1.p.3">If the 206 response is the result of an If-Range request, the response <em class="bcp14">SHOULD NOT</em> include other representation header fields. Otherwise, the response <em class="bcp14">MUST</em> include all of the representation header fields that would have been returned with a 200 (OK) response to the same request.
    680680      </p>
    681       <p id="rfc.section.3.1.p.4">A cache <em class="bcp14">MUST NOT</em> combine a 206 response with other previously cached content if the ETag or Last-Modified headers do not match exactly, see <a href="#combining.byte.ranges" title="Combining Ranges">Section&nbsp;4</a>.
    682       </p>
    683       <p id="rfc.section.3.1.p.5">A cache that does not support the Range and Content-Range headers <em class="bcp14">MUST NOT</em> cache 206 (Partial Content) responses. Furthermore, if a response uses a range unit that is not understood by the cache, then
     681      <p id="rfc.section.3.1.p.4">A cache <em class="bcp14">MUST NOT</em> combine a 206 response with other previously cached content if the ETag or Last-Modified header fields do not match exactly,
     682         see <a href="#combining.byte.ranges" title="Combining Ranges">Section&nbsp;4</a>.
     683      </p>
     684      <p id="rfc.section.3.1.p.5">A cache that does not support the Range and Content-Range header fields <em class="bcp14">MUST NOT</em> cache 206 (Partial Content) responses. Furthermore, if a response uses a range unit that is not understood by the cache, then
    684685         it <em class="bcp14">MUST NOT</em> be cached either.
    685686      </p>
     
    721722      </p>
    722723      <div id="rfc.figure.u.6"></div><pre class="text">  Accept-Ranges: bytes
    723 </pre><p id="rfc.section.5.1.p.5">but are not required to do so. Clients <em class="bcp14">MAY</em> generate range requests without having received this header for the resource involved. Range units are defined in <a href="#range.units" title="Range Units">Section&nbsp;2</a>.
     724</pre><p id="rfc.section.5.1.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>.
    724725      </p>
    725726      <p id="rfc.section.5.1.p.6">Servers that do not accept any kind of range request for a resource <em class="bcp14">MAY</em> send
     
    752753                             <a href="#header.content-range" class="smpl">other-range-resp-spec</a>
    753754  <a href="#header.content-range" class="smpl">other-range-resp-spec</a>    = *<a href="#notation" class="smpl">CHAR</a>
    754 </pre><p id="rfc.section.5.2.p.4">The header <em class="bcp14">SHOULD</em> indicate the total length of the full representation, unless this length is unknown or difficult to determine. The asterisk
     755</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
    755756         "*" character means that the instance-length is unknown at the time when the response was generated.
    756757      </p>
     
    779780      </ul>
    780781      <p id="rfc.section.5.2.p.9">When an HTTP message includes the content of a single range (for example, a response to a request for a single range, or to
    781          a request for a set of ranges that overlap without any holes), this content is transmitted with a Content-Range header, and
    782          a Content-Length header showing the number of bytes actually transferred. For example,
     782         a request for a set of ranges that overlap without any holes), this content is transmitted with a Content-Range header field,
     783         and a Content-Length header field showing the number of bytes actually transferred. For example,
    783784      </p>
    784785      <div id="rfc.figure.u.13"></div><pre class="text">  HTTP/1.1 206 Partial Content
     
    805806      <div class="note" id="rfc.section.5.2.p.16">
    806807         <p> <b>Note:</b> Clients cannot depend on servers to send a 416 (Requested range not satisfiable) response instead of a 200 (OK) response for
    807             an unsatisfiable Range request-header, since not all servers implement this request-header.
     808            an unsatisfiable Range request-header field, since not all servers implement this request-header field.
    808809         </p>
    809810      </div>
     
    812813      <h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a>&nbsp;<a id="header.if-range" href="#header.if-range">If-Range</a></h2>
    813814      <p id="rfc.section.5.3.p.1">If a client has a partial copy of a representation in its cache, and wishes to have an up-to-date copy of the entire representation
    814          in its cache, it could use the Range request-header with a conditional GET (using either or both of If-Unmodified-Since and
    815          If-Match.) However, if the condition fails because the representation has been modified, the client would then have to make
    816          a second request to obtain the entire current representation.
     815         in its cache, it could use the Range request-header field with a conditional GET (using either or both of If-Unmodified-Since
     816         and If-Match.) However, if the condition fails because the representation has been modified, the client would then have to
     817         make a second request to obtain the entire current representation.
    817818      </p>
    818819      <p id="rfc.section.5.3.p.2">The "If-Range" request-header field allows a client to "short-circuit" the second request. Informally, its meaning is "if
     
    821822      <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.13"></span><span id="rfc.iref.g.14"></span>  <a href="#header.if-range" class="smpl">If-Range</a>   = "If-Range" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.if-range" class="smpl">If-Range-v</a>
    822823  <a href="#header.if-range" class="smpl">If-Range-v</a> = <a href="#abnf.dependencies" class="smpl">entity-tag</a> / <a href="#abnf.dependencies" class="smpl">HTTP-date</a>
    823 </pre><p id="rfc.section.5.3.p.4">If the client has no entity-tag for a representation, 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
    824          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.
    825       </p>
    826       <p id="rfc.section.5.3.p.5">If the entity-tag given in the If-Range header matches the current cache validator for the representation, then the server <em class="bcp14">SHOULD</em> provide the specified sub-range of the representation using a 206 (Partial Content) response. If the cache validator does
     824</pre><p id="rfc.section.5.3.p.4">If the client has no entity-tag for a representation, but does have a Last-Modified date, it <em class="bcp14">MAY</em> use that date in an If-Range header field. (The server can distinguish between a valid HTTP-date and any form of entity-tag
     825         by examining no more than two characters.) The If-Range header field <em class="bcp14">SHOULD</em> only be used together with a Range header field, and <em class="bcp14">MUST</em> be ignored if the request does not include a Range header field, or if the server does not support the sub-range operation.
     826      </p>
     827      <p id="rfc.section.5.3.p.5">If the entity-tag given in the If-Range header field matches the current cache validator for the representation, then the
     828         server <em class="bcp14">SHOULD</em> provide the specified sub-range of the representation using a 206 (Partial Content) response. If the cache validator does
    827829         not match, then the server <em class="bcp14">SHOULD</em> return the entire representation using a 200 (OK) response.
    828830      </p>
     
    896898  <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>
    897899  <a href="#range.retrieval.requests" class="smpl">other-range-set</a> = 1*<a href="#notation" class="smpl">CHAR</a>
    898 </pre><p id="rfc.section.5.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,
    899          since Range supports efficient recovery from partially failed transfers, and supports efficient partial retrieval of large
    900          representations.
    901       </p>
    902       <p id="rfc.section.5.4.2.p.4">If the server supports the Range header and the specified range or ranges are appropriate for the representation: </p>
    903       <ul>
    904          <li>The presence of a Range header in an unconditional GET modifies what is returned if the GET is otherwise successful. In other
    905             words, the response carries a status code of 206 (Partial Content) instead of 200 (OK).
    906          </li>
    907          <li>The presence of a Range header in a conditional GET (a request using one or both of If-Modified-Since and If-None-Match, or
    908             one or both of If-Unmodified-Since and If-Match) modifies what is returned if the GET is otherwise successful and the condition
     900</pre><p id="rfc.section.5.4.2.p.3">A server <em class="bcp14">MAY</em> ignore the Range header field. However, HTTP/1.1 origin servers and intermediate caches ought to support byte ranges when
     901         possible, since Range supports efficient recovery from partially failed transfers, and supports efficient partial retrieval
     902         of large representations.
     903      </p>
     904      <p id="rfc.section.5.4.2.p.4">If the server supports the Range header field and the specified range or ranges are appropriate for the representation: </p>
     905      <ul>
     906         <li>The presence of a Range header field in an unconditional GET modifies what is returned if the GET is otherwise successful.
     907            In other words, the response carries a status code of 206 (Partial Content) instead of 200 (OK).
     908         </li>
     909         <li>The presence of a Range header field in a conditional GET (a request using one or both of If-Modified-Since and If-None-Match,
     910            or one or both of If-Unmodified-Since and If-Match) modifies what is returned if the GET is otherwise successful and the condition
    909911            is true. It does not affect the 304 (Not Modified) response returned if the conditional is false.
    910912         </li>
    911913      </ul>
    912       <p id="rfc.section.5.4.2.p.5">In some cases, it might be more appropriate to use the If-Range header (see <a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section&nbsp;5.3</a>) in addition to the Range header.
     914      <p id="rfc.section.5.4.2.p.5">In some cases, it might be more appropriate to use the If-Range header field (see <a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section&nbsp;5.3</a>) in addition to the Range header field.
    913915      </p>
    914916      <p id="rfc.section.5.4.2.p.6">If a proxy that supports ranges receives a Range request, forwards the request to an inbound server, and receives an entire
     
    12871289      </ul>
    12881290      <h2 id="rfc.section.D.4"><a href="#rfc.section.D.4">D.4</a>&nbsp;<a id="changes.since.02" href="#changes.since.02">Since draft-ietf-httpbis-p5-range-02</a></h2>
    1289       <p id="rfc.section.D.4.p.1">Ongoing work on IANA Message Header Registration (&lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/40">http://tools.ietf.org/wg/httpbis/trac/ticket/40</a>&gt;):
    1290       </p>
    1291       <ul>
    1292          <li>Reference RFC 3984, and update header registrations for headers defined in this document.</li>
     1291      <p id="rfc.section.D.4.p.1">Ongoing work on IANA Message Header Field Registration (&lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/40">http://tools.ietf.org/wg/httpbis/trac/ticket/40</a>&gt;):
     1292      </p>
     1293      <ul>
     1294         <li>Reference RFC 3984, and update header field registrations for headers defined in this document.</li>
    12931295      </ul>
    12941296      <h2 id="rfc.section.D.5"><a href="#rfc.section.D.5">D.5</a>&nbsp;<a id="changes.since.03" href="#changes.since.03">Since draft-ietf-httpbis-p5-range-03</a></h2>
     
    13041306         <li>Use "/" instead of "|" for alternatives.</li>
    13051307         <li>Introduce new ABNF rules for "bad" whitespace ("BWS"), optional whitespace ("OWS") and required whitespace ("RWS").</li>
    1306          <li>Rewrite ABNFs to spell out whitespace rules, factor out header value format definitions.</li>
     1308         <li>Rewrite ABNFs to spell out whitespace rules, factor out header field value format definitions.</li>
    13071309      </ul>
    13081310      <h2 id="rfc.section.D.7"><a href="#rfc.section.D.7">D.7</a>&nbsp;<a id="changes.since.05" href="#changes.since.05">Since draft-ietf-httpbis-p5-range-05</a></h2>
Note: See TracChangeset for help on using the changeset viewer.