Changeset 962 for draft-ietf-httpbis
- Timestamp:
- 29/07/10 12:27:30 (12 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p5-range.html
r957 r962 400 400 <meta name="dct.creator" content="Reschke, J. F."> 401 401 <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p5-range-latest"> 402 <meta name="dct.issued" scheme="ISO8601" content="2010-07-2 7">402 <meta name="dct.issued" scheme="ISO8601" content="2010-07-29"> 403 403 <meta name="dct.replaces" content="urn:ietf:rfc:2616"> 404 404 <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 "HTTP/1.1" and, taken together, obsoletes RFC 2616. Part 5 defines range-specific requests and the rules for constructing and combining responses to those requests."> … … 426 426 </tr> 427 427 <tr> 428 <td class="left">Expires: January 28, 2011</td>428 <td class="left">Expires: January 30, 2011</td> 429 429 <td class="right">J. Mogul</td> 430 430 </tr> … … 483 483 <tr> 484 484 <td class="left"></td> 485 <td class="right">July 2 7, 2010</td>485 <td class="right">July 29, 2010</td> 486 486 </tr> 487 487 </tbody> … … 509 509 in progress”. 510 510 </p> 511 <p>This Internet-Draft will expire in January 28, 2011.</p>511 <p>This Internet-Draft will expire in January 30, 2011.</p> 512 512 <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1> 513 513 <p>Copyright © 2010 IETF Trust and the persons identified as the document authors. All rights reserved.</p> … … 733 733 <h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a> <a id="header.content-range" href="#header.content-range">Content-Range</a></h2> 734 734 <p id="rfc.section.5.2.p.1">The "Content-Range" entity-header field is sent with a partial representation to specify where in the full representation 735 the partial body should be applied. Range units are defined in <a href="#range.units" title="Range Units">Section 2</a>. 735 the partial body should be applied. 736 </p> 737 <p id="rfc.section.5.2.p.2">Range units are defined in <a href="#range.units" title="Range Units">Section 2</a>. 736 738 </p> 737 739 <div id="rfc.figure.u.8"></div><pre class="inline"><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> <a href="#header.content-range" class="smpl">Content-Range</a> = "Content-Range" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.content-range" class="smpl">Content-Range-v</a> … … 752 754 <a href="#header.content-range" class="smpl">other-range-resp-spec</a> 753 755 <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. 3">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 asterisk756 </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 757 "*" character means that the instance-length is unknown at the time when the response was generated. 756 758 </p> 757 <p id="rfc.section.5.2.p. 4">Unlike byte-ranges-specifier values (see <a href="#byte.ranges" title="Byte Ranges">Section 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.758 </p> 759 <p id="rfc.section.5.2.p. 5">A byte-content-range-spec with a byte-range-resp-spec whose last-byte-pos value is less than its first-byte-pos value, or759 <p id="rfc.section.5.2.p.5">Unlike byte-ranges-specifier values (see <a href="#byte.ranges" title="Byte Ranges">Section 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. 760 </p> 761 <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 760 762 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. 761 763 </p> 762 <p id="rfc.section.5.2.p. 6">In the case of a byte range request: A server sending a response with status code 416 (Requested range not satisfiable) <em class="bcp14">SHOULD</em> include a Content-Range field with a byte-range-resp-spec of "*". The instance-length specifies the current length of the764 <p id="rfc.section.5.2.p.7">In the case of a byte range request: A server sending a response with status code 416 (Requested range not satisfiable) <em class="bcp14">SHOULD</em> include a Content-Range field with a byte-range-resp-spec of "*". The instance-length specifies the current length of the 763 765 selected resource. A response with status code 206 (Partial Content) <em class="bcp14">MUST NOT</em> include a Content-Range field with a byte-range-resp-spec of "*". 764 766 </p> 765 <p id="rfc.section.5.2.p. 7">Examples of byte-content-range-spec values, assuming that the representation contains a total of 1234 bytes: </p>767 <p id="rfc.section.5.2.p.8">Examples of byte-content-range-spec values, assuming that the representation contains a total of 1234 bytes: </p> 766 768 <ul> 767 769 <li>The first 500 bytes: … … 778 780 </pre> </li> 779 781 </ul> 780 <p id="rfc.section.5.2.p. 8">When an HTTP message includes the content of a single range (for example, a response to a request for a single range, or to782 <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 783 a request for a set of ranges that overlap without any holes), this content is transmitted with a Content-Range header, and 782 784 a Content-Length header showing the number of bytes actually transferred. For example, … … 788 790 Content-Length: 26012 789 791 Content-Type: image/gif 790 </pre><p id="rfc.section.5.2.p.1 0">When an HTTP message includes the content of multiple ranges (for example, a response to a request for multiple non-overlapping792 </pre><p id="rfc.section.5.2.p.11">When an HTTP message includes the content of multiple ranges (for example, a response to a request for multiple non-overlapping 791 793 ranges), these are transmitted as a multipart message. The multipart media type used for this purpose is "multipart/byteranges" 792 794 as defined in <a href="#internet.media.type.multipart.byteranges" title="Internet Media Type multipart/byteranges">Appendix A</a>. 793 795 </p> 794 <p id="rfc.section.5.2.p.1 1">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.795 </p> 796 <p id="rfc.section.5.2.p.1 2">When a client requests multiple ranges in one request, the server <em class="bcp14">SHOULD</em> return them in the order that they appeared in the request.797 </p> 798 <p id="rfc.section.5.2.p.1 3">If the server ignores a byte-range-spec because it is syntactically invalid, the server <em class="bcp14">SHOULD</em> treat the request as if the invalid Range header field did not exist. (Normally, this means return a 200 response containing796 <p id="rfc.section.5.2.p.12">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. 797 </p> 798 <p id="rfc.section.5.2.p.13">When a client requests multiple ranges in one request, the server <em class="bcp14">SHOULD</em> return them in the order that they appeared in the request. 799 </p> 800 <p id="rfc.section.5.2.p.14">If the server ignores a byte-range-spec because it is syntactically invalid, the server <em class="bcp14">SHOULD</em> treat the request as if the invalid Range header field did not exist. (Normally, this means return a 200 response containing 799 801 the full representation). 800 802 </p> 801 <p id="rfc.section.5.2.p.1 4">If the server receives a request (other than one including an If-Range request-header field) with an unsatisfiable Range request-header803 <p id="rfc.section.5.2.p.15">If the server receives a request (other than one including an If-Range request-header field) with an unsatisfiable Range request-header 802 804 field (that is, all of whose byte-range-spec values have a first-byte-pos value greater than the current length of the selected 803 805 resource), it <em class="bcp14">SHOULD</em> return a response code of 416 (Requested range not satisfiable) (<a href="#status.416" id="rfc.xref.status.416.1" title="416 Requested Range Not Satisfiable">Section 3.2</a>). 804 806 </p> 805 <div class="note" id="rfc.section.5.2.p.1 5">807 <div class="note" id="rfc.section.5.2.p.16"> 806 808 <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 809 an unsatisfiable Range request-header, since not all servers implement this request-header. -
draft-ietf-httpbis/latest/p5-range.xml
r930 r962 525 525 The "Content-Range" entity-header field is sent with a partial representation to 526 526 specify where in the full representation the partial body should be 527 applied. Range units are defined in <xref target="range.units"/>. 527 applied. 528 </t> 529 <t> 530 Range units are defined in <xref target="range.units"/>. 528 531 </t> 529 532 <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Content-Range"/><iref primary="true" item="Grammar" subitem="Content-Range-v"/><iref primary="true" item="Grammar" subitem="content-range-spec"/><iref primary="true" item="Grammar" subitem="byte-content-range-spec"/><iref primary="true" item="Grammar" subitem="byte-range-resp-spec"/><iref primary="true" item="Grammar" subitem="instance-length"/>
Note: See TracChangeset
for help on using the changeset viewer.