Ignore:
Timestamp:
23/01/13 12:27:35 (10 years ago)
Author:
fielding@…
Message:

(editorial) more cleanup in p5

Location:
draft-ietf-httpbis/latest
Files:
2 edited

Legend:

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

    r2152 r2153  
    780780      <div id="rfc.iref.20"></div>
    781781      <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;<a id="status.206" href="#status.206">206 Partial Content</a></h2>
    782       <p id="rfc.section.4.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="#header.range" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.2" title="Range">Section&nbsp;3.1</a>) indicating the desired range, and <em class="bcp14">MAY</em> have included an <a href="#header.if-range" class="smpl">If-Range</a> header field (<a href="#header.if-range" id="rfc.xref.header.if-range.2" title="If-Range">Section&nbsp;3.2</a>) to make the request conditional.
    783       </p>
    784       <p id="rfc.section.4.1.p.2">When an HTTP message includes the content of a single range (for example, a response to a request for a single range, or to
    785          a request for a set of ranges that overlap without any holes), this content is transmitted with a <a href="#header.content-range" class="smpl">Content-Range</a> header field, and a <a href="p1-messaging.html#header.content-length" class="smpl">Content-Length</a> header field showing the number of bytes actually transferred. For example,
     782      <p id="rfc.section.4.1.p.1">The <dfn>206 (Partial Content)</dfn> status code indicates that the server is successfully fulfilling a range request for the target resource by transferring one
     783         or more parts of the selected representation that correspond to the satisfiable ranges found in the requests's <a href="#header.range" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.2" title="Range">Section&nbsp;3.1</a>).
     784      </p>
     785      <p id="rfc.section.4.1.p.2">If a single part is being transferred, the server generating the 206 response <em class="bcp14">MUST</em> generate a <a href="#header.content-range" class="smpl">Content-Range</a> header field, describing what range of the selected representation is enclosed, and a payload consisting of the range. For
     786         example:
    786787      </p>
    787788      <div id="rfc.figure.u.17"></div><pre class="text">HTTP/1.1 206 Partial Content
     
    791792Content-Length: 26012
    792793Content-Type: image/gif
    793 </pre><p id="rfc.section.4.1.p.4">When an HTTP message includes the content of multiple ranges (for example, a response to a request for multiple non-overlapping
    794          ranges), these are transmitted as a multipart message. The multipart media type used for this purpose is "multipart/byteranges"
    795          as defined in <a href="#internet.media.type.multipart.byteranges" title="Internet Media Type multipart/byteranges">Appendix&nbsp;A</a>.
    796       </p>
    797       <p id="rfc.section.4.1.p.5">A server <em class="bcp14">MAY</em> combine requested ranges when those ranges are overlapping (see <a href="#overlapping.ranges" title="Overlapping Ranges">Section&nbsp;6.1</a>).
    798       </p>
    799       <p id="rfc.section.4.1.p.6">A response to a request for a single range <em class="bcp14">MUST NOT</em> be sent using the multipart/byteranges media type. A response to a request for multiple ranges, whose result is a single range, <em class="bcp14">MAY</em> be sent as a multipart/byteranges media type with one part. A client that cannot decode a multipart/byteranges message <em class="bcp14">MUST NOT</em> ask for multiple ranges in a single request.
    800       </p>
    801       <p id="rfc.section.4.1.p.7">When a client asks for multiple ranges in one request, the server <em class="bcp14">SHOULD</em> send them in the order that they appeared in the request.
    802       </p>
    803       <p id="rfc.section.4.1.p.8">When a 206 response is generated, the sender <em class="bcp14">MUST</em> generate the following header fields:
     794
     795... 26012 bytes of image data ...
     796</pre><p id="rfc.section.4.1.p.4">If multiple parts are being transferred, the server generating the 206 response <em class="bcp14">MUST</em> generate a "multipart/byteranges" payload, as defined in <a href="#internet.media.type.multipart.byteranges" title="Internet Media Type multipart/byteranges">Appendix&nbsp;A</a>, and send a <a href="p2-semantics.html#header.content-type" class="smpl">Content-Type</a> header field containing the "multipart/byteranges" media type and its required boundary parameter. For example:
     797      </p>
     798      <div id="rfc.figure.u.18"></div><pre class="text">HTTP/1.1 206 Partial Content
     799Date: Wed, 15 Nov 1995 06:25:24 GMT
     800Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
     801Content-Length: 1741
     802Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
     803
     804--THIS_STRING_SEPARATES
     805Content-Type: application/pdf
     806Content-Range: bytes 500-999/8000
     807
     808...the first range...
     809--THIS_STRING_SEPARATES
     810Content-Type: application/pdf
     811Content-Range: bytes 7000-7999/8000
     812
     813...the second range
     814--THIS_STRING_SEPARATES--
     815</pre><p id="rfc.section.4.1.p.6">A server <em class="bcp14">MAY</em> combine requested ranges when those ranges are overlapping (see <a href="#overlapping.ranges" title="Overlapping Ranges">Section&nbsp;6.1</a>).
     816      </p>
     817      <p id="rfc.section.4.1.p.7">A response to a request for a single range <em class="bcp14">MUST NOT</em> be sent using the multipart/byteranges media type. A response to a request for multiple ranges, whose result is a single range, <em class="bcp14">MAY</em> be sent as a multipart/byteranges media type with one part. A client that cannot decode a multipart/byteranges message <em class="bcp14">MUST NOT</em> ask for multiple ranges in a single request.
     818      </p>
     819      <p id="rfc.section.4.1.p.8">When a client asks for multiple ranges in one request, the server <em class="bcp14">SHOULD</em> send them in the order that they appeared in the request.
     820      </p>
     821      <p id="rfc.section.4.1.p.9">When a 206 response is generated, the sender <em class="bcp14">MUST</em> generate the following header fields:
    804822      </p>
    805823      <ul>
     
    811829         </li>
    812830      </ul>
    813       <p id="rfc.section.4.1.p.9">If a 206 is generated in response to a request with an <a href="#header.if-range" class="smpl">If-Range</a> header field, the sender <em class="bcp14">SHOULD NOT</em> generate other representation header fields beyond those described above. Otherwise, the sender <em class="bcp14">MUST</em> generate all of the same representation header fields that would have been sent in a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response to the same request.
    814       </p>
    815       <p id="rfc.section.4.1.p.10">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 206 responses.
     831      <p id="rfc.section.4.1.p.10">If a 206 is generated in response to a request with an <a href="#header.if-range" class="smpl">If-Range</a> header field, the sender <em class="bcp14">SHOULD NOT</em> generate other representation header fields beyond those described above. Otherwise, the sender <em class="bcp14">MUST</em> generate all of the same representation header fields that would have been sent in a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response to the same request.
     832      </p>
     833      <p id="rfc.section.4.1.p.11">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 206 responses.
    816834      </p>
    817835      <div id="rfc.iref.c.1"></div>
     
    820838         enclosed as payload.
    821839      </p>
    822       <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span><span id="rfc.iref.g.20"></span><span id="rfc.iref.g.21"></span><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span>  <a href="#header.content-range" class="smpl">Content-Range</a>       = <a href="#header.content-range" class="smpl">byte-content-range</a>
     840      <div id="rfc.figure.u.19"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span><span id="rfc.iref.g.20"></span><span id="rfc.iref.g.21"></span><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span><span id="rfc.iref.g.24"></span><span id="rfc.iref.g.25"></span>  <a href="#header.content-range" class="smpl">Content-Range</a>       = <a href="#header.content-range" class="smpl">byte-content-range</a>
    823841                      / <a href="#header.content-range" class="smpl">other-content-range</a>
    824842                         
     
    846864         selected representation is known by the sender to be 1234 bytes:
    847865      </p>
    848       <div id="rfc.figure.u.19"></div><pre class="text">  Content-Range: bytes 42-1233/1234
     866      <div id="rfc.figure.u.20"></div><pre class="text">  Content-Range: bytes 42-1233/1234
    849867</pre><p id="rfc.section.4.2.p.8">or this second example would apply when the complete length is unknown:</p>
    850       <div id="rfc.figure.u.20"></div><pre class="text">  Content-Range: bytes 42-1233/*
     868      <div id="rfc.figure.u.21"></div><pre class="text">  Content-Range: bytes 42-1233/*
    851869</pre><p id="rfc.section.4.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:
    852870      </p>
    853       <div id="rfc.figure.u.21"></div><pre class="text">  Content-Range: bytes */1234
     871      <div id="rfc.figure.u.22"></div><pre class="text">  Content-Range: bytes */1234
    854872</pre><p id="rfc.section.4.2.p.12">The complete-length in a 416 response indicates the current length of the selected representation, which will be known by
    855873         the server generating the response because that is how it determined the range to be unsatisfiable.
     
    861879      <ul>
    862880         <li>The first 500 bytes:
    863             <div id="rfc.figure.u.22"></div><pre class="text">  Content-Range: bytes 0-499/1234
     881            <div id="rfc.figure.u.23"></div><pre class="text">  Content-Range: bytes 0-499/1234
    864882</pre> </li>
    865883         <li>The second 500 bytes:
    866             <div id="rfc.figure.u.23"></div><pre class="text">  Content-Range: bytes 500-999/1234
     884            <div id="rfc.figure.u.24"></div><pre class="text">  Content-Range: bytes 500-999/1234
    867885</pre> </li>
    868886         <li>All except for the first 500 bytes:
    869             <div id="rfc.figure.u.24"></div><pre class="text">  Content-Range: bytes 500-1233/1234
     887            <div id="rfc.figure.u.25"></div><pre class="text">  Content-Range: bytes 500-1233/1234
    870888</pre> </li>
    871889         <li>The last 500 bytes:
    872             <div id="rfc.figure.u.25"></div><pre class="text">  Content-Range: bytes 734-1233/1234
     890            <div id="rfc.figure.u.26"></div><pre class="text">  Content-Range: bytes 734-1233/1234
    873891</pre> </li>
    874892      </ul>
     
    894912      <div id="rfc.iref.29"></div>
    895913      <h2 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4</a>&nbsp;<a id="status.416" href="#status.416">416 Range Not Satisfiable</a></h2>
    896       <p id="rfc.section.4.4.p.1">The <dfn>416 (Range Not Satisfiable)</dfn> status code indicates that none of the ranges-specifier values in the request's <a href="#header.range" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.3" title="Range">Section&nbsp;3.1</a>) overlap the current extent of the selected resource and the request did not include an <a href="#header.if-range" class="smpl">If-Range</a> header field (<a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section&nbsp;3.2</a>). (For byte-ranges, this means that the first-byte-pos of all of the byte-range-spec values were greater than the current
     914      <p id="rfc.section.4.4.p.1">The <dfn>416 (Range Not Satisfiable)</dfn> status code indicates that none of the ranges-specifier values in the request's <a href="#header.range" class="smpl">Range</a> header field (<a href="#header.range" id="rfc.xref.header.range.3" title="Range">Section&nbsp;3.1</a>) overlap the current extent of the selected resource and the request did not include an <a href="#header.if-range" class="smpl">If-Range</a> header field (<a href="#header.if-range" id="rfc.xref.header.if-range.2" title="If-Range">Section&nbsp;3.2</a>). (For byte-ranges, this means that the first-byte-pos of all of the byte-range-spec values were greater than the current
    897915         length of the selected representation.)
    898916      </p>
    899917      <p id="rfc.section.4.4.p.2">When this status code is sent in response to a byte-range request, the sender <em class="bcp14">SHOULD</em> generate a <a href="#header.content-range" class="smpl">Content-Range</a> header field specifying the current length of the selected representation (see <a href="#header.content-range" id="rfc.xref.header.content-range.3" title="Content-Range">Section&nbsp;4.2</a>).
    900918      </p>
    901       <div id="rfc.figure.u.26"></div>
     919      <div id="rfc.figure.u.27"></div>
    902920      <p>For example:</p>  <pre class="text">HTTP/1.1 416 Range Not Satisfiable
    903921Date: Mon, 20 Jan 2012 15:41:54 GMT
     
    931949            <thead>
    932950               <tr>
    933                   <th>Range Specifier Name</th>
     951                  <th>Range Unit Name</th>
    934952                  <th>Description</th>
    935953                  <th>Reference</th>
     
    10131031                  <td class="left">http</td>
    10141032                  <td class="left">standard</td>
    1015                   <td class="left"> <a href="#header.if-range" id="rfc.xref.header.if-range.4" title="If-Range">Section&nbsp;3.2</a>
     1033                  <td class="left"> <a href="#header.if-range" id="rfc.xref.header.if-range.3" title="If-Range">Section&nbsp;3.2</a>
    10161034                  </td>
    10171035               </tr>
     
    11181136      <div id="rfc.iref.m.2"></div>
    11191137      <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a id="internet.media.type.multipart.byteranges" href="#internet.media.type.multipart.byteranges">Internet Media Type multipart/byteranges</a></h1>
    1120       <p id="rfc.section.A.p.1">When an HTTP <a href="#status.206" class="smpl">206 (Partial Content)</a> response message includes the content of multiple ranges (a response to a request for multiple non-overlapping ranges), these
    1121          are transmitted as a multipart message body (<a href="#RFC2046" id="rfc.xref.RFC2046.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a>, <a href="http://tools.ietf.org/html/rfc2046#section-5.1">Section 5.1</a>). The media type for this purpose is called "multipart/byteranges". The following is to be registered with IANA <a href="#BCP13" id="rfc.xref.BCP13.1"><cite title="Media Type Specifications and Registration Procedures">[BCP13]</cite></a>.
    1122       </p>
    1123       <p id="rfc.section.A.p.2">The multipart/byteranges media type includes one or more parts, each with its own <a href="p2-semantics.html#header.content-type" class="smpl">Content-Type</a> and <a href="#header.content-range" class="smpl">Content-Range</a> fields. The required boundary parameter specifies the boundary string used to separate each body-part.
     1138      <p id="rfc.section.A.p.1">When a <a href="#status.206" class="smpl">206 (Partial Content)</a> response message includes the content of multiple ranges, they are transmitted as body-parts in a multipart message body (<a href="#RFC2046" id="rfc.xref.RFC2046.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a>, <a href="http://tools.ietf.org/html/rfc2046#section-5.1">Section 5.1</a>) with the media type of "multipart/byteranges". The following definition is to be registered with IANA <a href="#BCP13" id="rfc.xref.BCP13.1"><cite title="Media Type Specifications and Registration Procedures">[BCP13]</cite></a>.
     1139      </p>
     1140      <p id="rfc.section.A.p.2">The multipart/byteranges media type includes one or more body-parts, each with its own <a href="p2-semantics.html#header.content-type" class="smpl">Content-Type</a> and <a href="#header.content-range" class="smpl">Content-Range</a> fields. The required boundary parameter specifies the boundary string used to separate each body-part.
    11241141      </p>
    11251142      <p id="rfc.section.A.p.3"> </p>
     
    11641181         <dd>IESG</dd>
    11651182      </dl>
    1166       <div class="note" id="rfc.section.A.p.4">
    1167          <p> <b>Note:</b> Despite the name "multipart/byteranges" is not limited to the byte ranges only.
    1168          </p>
    1169       </div>
    1170       <div id="rfc.figure.u.27"></div>
    1171       <p>For example:</p><pre class="text">  HTTP/1.1 206 Partial Content
    1172   Date: Wed, 15 Nov 1995 06:25:24 GMT
    1173   Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
    1174   Content-Length: 1741
    1175   Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
    1176  
    1177   --THIS_STRING_SEPARATES
    1178   Content-Type: application/pdf
    1179   Content-Range: bytes 500-999/8000
    1180  
    1181   ...the first range...
    1182   --THIS_STRING_SEPARATES
    1183   Content-Type: application/pdf
    1184   Content-Range: bytes 7000-7999/8000
    1185  
    1186   ...the second range
    1187   --THIS_STRING_SEPARATES--
    1188 </pre><div id="rfc.figure.u.28"></div>
    1189       <p>Another example, using the "exampleunit" range unit:</p>  <pre class="text">  HTTP/1.1 206 Partial Content
    1190   Date: Tue, 14 Nov 1995 06:25:24 GMT
    1191   Last-Modified: Tue, 14 July 04:58:08 GMT
    1192   Content-Length: 2331785
    1193   Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
    1194  
    1195   --THIS_STRING_SEPARATES
    1196   Content-Type: video/example
    1197   Content-Range: exampleunit 1.2-4.3/25
    1198  
    1199   ...the first range...
    1200   --THIS_STRING_SEPARATES
    1201   Content-Type: video/example
    1202   Content-Range: exampleunit 11.2-14.3/25
    1203  
    1204   ...the second range
    1205   --THIS_STRING_SEPARATES--
    1206 </pre> <p id="rfc.section.A.p.7">Notes: </p>
     1183      <p id="rfc.section.A.p.4">Implementation Notes: </p>
    12071184      <ol>
    1208          <li>Additional CRLFs <em class="bcp14">MAY</em> precede the first boundary string in the body.
    1209          </li>
     1185         <li>Additional CRLFs might precede the first boundary string in the body.</li>
    12101186         <li>Although <a href="#RFC2046" id="rfc.xref.RFC2046.2"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a> permits the boundary string to be quoted, some existing implementations handle a quoted boundary string incorrectly.
    12111187         </li>
    1212          <li>A number of clients and servers were coded to an early draft of the byteranges specification to use a media type of multipart/x-byteranges<span id="rfc.iref.m.3"></span><span id="rfc.iref.m.4"></span>, which is almost, but not quite compatible with the version documented in HTTP/1.1.
     1188         <li>A number of clients and servers were coded to an early draft of the byteranges specification that used a media type of multipart/x-byteranges<span id="rfc.iref.m.3"></span><span id="rfc.iref.m.4"></span>, which is almost (but not quite) compatible with this type.
    12131189         </li>
    12141190      </ol>
    1215       <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFC 2616</a></h1>
     1191      <p id="rfc.section.A.p.5">Despite the name, the "multipart/byteranges" media type is not limited to byte ranges. The following example uses an "exampleunit"
     1192         range unit:
     1193      </p>
     1194      <div id="rfc.figure.u.28"></div><pre class="text">HTTP/1.1 206 Partial Content
     1195Date: Tue, 14 Nov 1995 06:25:24 GMT
     1196Last-Modified: Tue, 14 July 04:58:08 GMT
     1197Content-Length: 2331785
     1198Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
     1199
     1200--THIS_STRING_SEPARATES
     1201Content-Type: video/example
     1202Content-Range: exampleunit 1.2-4.3/25
     1203
     1204...the first range...
     1205--THIS_STRING_SEPARATES
     1206Content-Type: video/example
     1207Content-Range: exampleunit 11.2-14.3/25
     1208
     1209...the second range
     1210--THIS_STRING_SEPARATES--
     1211</pre> <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFC 2616</a></h1>
    12161212      <p id="rfc.section.B.p.1">A weak validator cannot be used in a <a href="#status.206" class="smpl">206</a> response. (<a href="#status.206" id="rfc.xref.status.206.2" title="206 Partial Content">Section&nbsp;4.1</a>)
    12171213      </p>
     
    12231219      <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>)
    12241220      </p>
    1225       <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;5.1</a>)
     1221      <p id="rfc.section.B.p.5">This specification introduces a Range Unit Registry. (<a href="#range.unit.registry" title="Range Unit Registry">Section&nbsp;5.1</a>)
    12261222      </p>
    12271223      <h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a id="imported.abnf" href="#imported.abnf">Imported ABNF</a></h1>
     
    13691365            </li>
    13701366            <li><a id="rfc.index.I" href="#rfc.index.I"><b>I</b></a><ul>
    1371                   <li>If-Range header field&nbsp;&nbsp;<a href="#rfc.xref.header.if-range.1">3.1</a>, <a href="#rfc.iref.i.1"><b>3.2</b></a>, <a href="#rfc.xref.header.if-range.2">4.1</a>, <a href="#rfc.xref.header.if-range.3">4.4</a>, <a href="#rfc.xref.header.if-range.4">5.3</a></li>
     1367                  <li>If-Range header field&nbsp;&nbsp;<a href="#rfc.xref.header.if-range.1">3.1</a>, <a href="#rfc.iref.i.1"><b>3.2</b></a>, <a href="#rfc.xref.header.if-range.2">4.4</a>, <a href="#rfc.xref.header.if-range.3">5.3</a></li>
    13721368               </ul>
    13731369            </li>
  • draft-ietf-httpbis/latest/p5-range.xml

    r2152 r2153  
    487487<t>
    488488   The <x:dfn>206 (Partial Content)</x:dfn> status code indicates that the
    489    server has fulfilled the partial GET request for the resource.
    490    The request &MUST; have included a <x:ref>Range</x:ref> header field
    491    (<xref target="header.range"/>) indicating the desired range, and &MAY; have
    492    included an <x:ref>If-Range</x:ref> header field
    493    (<xref target="header.if-range"/>) to make the request conditional.
    494 </t>
    495 <t>
    496    When an HTTP message includes the content of a single range (for
    497    example, a response to a request for a single range, or to a request
    498    for a set of ranges that overlap without any holes), this content is
    499    transmitted with a <x:ref>Content-Range</x:ref> header field, and a
    500    <x:ref>Content-Length</x:ref> header field showing the number of bytes
    501    actually transferred. For example,
     489   server is successfully fulfilling a range request for the target resource
     490   by transferring one or more parts of the selected representation that
     491   correspond to the satisfiable ranges found in the requests's
     492   <x:ref>Range</x:ref> header field (<xref target="header.range"/>).
     493</t>
     494<t>
     495   If a single part is being transferred, the server generating the 206
     496   response &MUST; generate a <x:ref>Content-Range</x:ref> header field,
     497   describing what range of the selected representation is enclosed, and a
     498   payload consisting of the range. For example:
    502499</t>
    503500<figure><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
     
    508505Content-Length: 26012
    509506Content-Type: image/gif
    510 </artwork></figure>
    511 <t>
    512    When an HTTP message includes the content of multiple ranges (for
    513    example, a response to a request for multiple non-overlapping
    514    ranges), these are transmitted as a multipart message. The multipart
    515    media type used for this purpose is "multipart/byteranges" as defined
    516    in <xref target="internet.media.type.multipart.byteranges"/>.
    517 </t>
     507
     508... 26012 bytes of image data ...
     509</artwork></figure>
     510<t>
     511   If multiple parts are being transferred, the server generating the 206
     512   response &MUST; generate a "multipart/byteranges" payload, as defined
     513   in <xref target="internet.media.type.multipart.byteranges"/>, and send a
     514   <x:ref>Content-Type</x:ref> header field containing the
     515   "multipart/byteranges" media type and its required boundary parameter.
     516   For example:
     517</t>
     518<figure><preamble>
     519</preamble><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
     520HTTP/1.1 206 Partial Content
     521Date: Wed, 15 Nov 1995 06:25:24 GMT
     522Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
     523Content-Length: 1741
     524Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
     525
     526--THIS_STRING_SEPARATES
     527Content-Type: application/pdf
     528Content-Range: bytes 500-999/8000
     529
     530...the first range...
     531--THIS_STRING_SEPARATES
     532Content-Type: application/pdf
     533Content-Range: bytes 7000-7999/8000
     534
     535...the second range
     536--THIS_STRING_SEPARATES--
     537</artwork></figure>
    518538<t>
    519539   A server &MAY; combine requested ranges when those ranges are overlapping
     
    818838</t>
    819839<texttable align="left" suppress-title="true" anchor="iana.range.units.table">
    820    <ttcol>Range Specifier Name</ttcol>
     840   <ttcol>Range Unit Name</ttcol>
    821841   <ttcol>Description</ttcol>
    822842   <ttcol>Reference</ttcol>
     
    11831203<iref item="multipart/byteranges Media Type" primary="true"/>
    11841204<t>
    1185    When an HTTP <x:ref>206 (Partial Content)</x:ref> response message includes the
    1186    content of multiple ranges (a response to a request for multiple
    1187    non-overlapping ranges), these are transmitted as a multipart
    1188    message body (<xref target="RFC2046" x:fmt="," x:sec="5.1"/>). The media type for this purpose is called
    1189    "multipart/byteranges".  The following is to be registered with IANA <xref target="BCP13"/>.
    1190 </t>
    1191 <t>
    1192    The multipart/byteranges media type includes one or more parts, each
     1205   When a <x:ref>206 (Partial Content)</x:ref> response message includes the
     1206   content of multiple ranges, they are transmitted as body-parts in a
     1207   multipart message body (<xref target="RFC2046" x:fmt="," x:sec="5.1"/>)
     1208   with the media type of "multipart/byteranges".  The following definition is
     1209   to be registered with IANA <xref target="BCP13"/>.
     1210</t>
     1211<t>
     1212   The multipart/byteranges media type includes one or more body-parts, each
    11931213   with its own <x:ref>Content-Type</x:ref> and <x:ref>Content-Range</x:ref>
    11941214   fields. The required boundary parameter specifies the boundary string used
     
    12451265  </list>
    12461266</t>
    1247 <x:note>
    1248   <t>
    1249     &Note; Despite the name "multipart/byteranges" is not limited to the byte ranges only.
    1250   </t>
    1251 </x:note>
    1252 <figure><preamble>
    1253    For example:
    1254 </preamble><artwork type="example">
    1255   HTTP/1.1 206 Partial Content
    1256   Date: Wed, 15 Nov 1995 06:25:24 GMT
    1257   Last-Modified: Wed, 15 Nov 1995 04:58:08 GMT
    1258   Content-Length: 1741
    1259   Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
    1260  
    1261   --THIS_STRING_SEPARATES
    1262   Content-Type: application/pdf
    1263   Content-Range: bytes 500-999/8000
    1264  
    1265   ...the first range...
    1266   --THIS_STRING_SEPARATES
    1267   Content-Type: application/pdf
    1268   Content-Range: bytes 7000-7999/8000
    1269  
    1270   ...the second range
    1271   --THIS_STRING_SEPARATES--
    1272 </artwork></figure>
    1273 <figure><preamble>
    1274    Another example, using the "exampleunit" range unit:
    1275 </preamble>
    1276 <artwork type="example">
    1277   HTTP/1.1 206 Partial Content
    1278   Date: Tue, 14 Nov 1995 06:25:24 GMT
    1279   Last-Modified: Tue, 14 July 04:58:08 GMT
    1280   Content-Length: 2331785
    1281   Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
    1282  
    1283   --THIS_STRING_SEPARATES
    1284   Content-Type: video/example
    1285   Content-Range: exampleunit 1.2-4.3/25
    1286  
    1287   ...the first range...
    1288   --THIS_STRING_SEPARATES
    1289   Content-Type: video/example
    1290   Content-Range: exampleunit 11.2-14.3/25
    1291  
    1292   ...the second range
    1293   --THIS_STRING_SEPARATES--
    1294 </artwork>
    1295 </figure>
    1296 <t>
    1297   Notes:
     1267<t>
     1268  Implementation Notes:
    12981269  <list style="numbers">
    1299       <t>Additional CRLFs &MAY; precede the first boundary string in the body.</t>
     1270      <t>Additional CRLFs might precede the first boundary string in the body.</t>
    13001271
    13011272      <t>Although <xref target="RFC2046"/> permits the boundary string to be
     
    13041275
    13051276      <t>A number of clients and servers were coded to an early draft
    1306          of the byteranges specification to use a media type of
    1307          multipart/x-byteranges<iref item="multipart/x-byteranges Media Type"/><iref item="Media Type" subitem="multipart/x-byteranges"/>, which is almost, but not quite
    1308          compatible with the version documented in HTTP/1.1.</t>
     1277         of the byteranges specification that used a media type of
     1278         multipart/x-byteranges<iref item="multipart/x-byteranges Media Type"/><iref item="Media Type" subitem="multipart/x-byteranges"/>,
     1279         which is almost (but not quite) compatible with this type.</t>
    13091280  </list>
    13101281</t>
     1282<t>
     1283   Despite the name, the "multipart/byteranges" media type is not limited to
     1284   byte ranges. The following example uses an "exampleunit" range unit:
     1285</t>
     1286<figure><artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
     1287HTTP/1.1 206 Partial Content
     1288Date: Tue, 14 Nov 1995 06:25:24 GMT
     1289Last-Modified: Tue, 14 July 04:58:08 GMT
     1290Content-Length: 2331785
     1291Content-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES
     1292
     1293--THIS_STRING_SEPARATES
     1294Content-Type: video/example
     1295Content-Range: exampleunit 1.2-4.3/25
     1296
     1297...the first range...
     1298--THIS_STRING_SEPARATES
     1299Content-Type: video/example
     1300Content-Range: exampleunit 11.2-14.3/25
     1301
     1302...the second range
     1303--THIS_STRING_SEPARATES--
     1304</artwork>
     1305</figure>
    13111306</section>
    13121307
     
    13311326</t>
    13321327<t>
    1333   This specification introduces a Range Specifier Registry.
     1328  This specification introduces a Range Unit Registry.
    13341329  (<xref target="range.unit.registry"/>)
    13351330</t>
Note: See TracChangeset for help on using the changeset viewer.