draft-ietf-httpbis-p5-range-18.txt   draft-ietf-httpbis-p5-range-latest.txt 
HTTPbis Working Group R. Fielding, Ed. HTTPbis Working Group R. Fielding, Ed.
Internet-Draft Adobe Internet-Draft Adobe
Obsoletes: 2616 (if approved) J. Gettys Obsoletes: 2616 (if approved) J. Gettys
Intended status: Standards Track Alcatel-Lucent Intended status: Standards Track Alcatel-Lucent
Expires: July 7, 2012 J. Mogul Expires: August 6, 2012 J. Mogul
HP HP
H. Frystyk H. Frystyk
Microsoft Microsoft
L. Masinter L. Masinter
Adobe Adobe
P. Leach P. Leach
Microsoft Microsoft
T. Berners-Lee T. Berners-Lee
W3C/MIT W3C/MIT
Y. Lafon, Ed. Y. Lafon, Ed.
W3C W3C
J. Reschke, Ed. J. Reschke, Ed.
greenbytes greenbytes
January 4, 2012 February 3, 2012
HTTP/1.1, part 5: Range Requests and Partial Responses HTTP/1.1, part 5: Range Requests and Partial Responses
draft-ietf-httpbis-p5-range-18 draft-ietf-httpbis-p5-range-latest
Abstract Abstract
The Hypertext Transfer Protocol (HTTP) is an application-level The Hypertext Transfer Protocol (HTTP) is an application-level
protocol for distributed, collaborative, hypertext information protocol for distributed, collaborative, hypertext information
systems. HTTP has been in use by the World Wide Web global systems. HTTP has been in use by the World Wide Web global
information initiative since 1990. This document is Part 5 of the information initiative since 1990. This document is Part 5 of the
seven-part specification that defines the protocol referred to as seven-part specification that defines the protocol referred to as
"HTTP/1.1" and, taken together, obsoletes RFC 2616. "HTTP/1.1" and, taken together, obsoletes RFC 2616.
skipping to change at page 1, line 49 skipping to change at page 1, line 49
Discussion of this draft should take place on the HTTPBIS working Discussion of this draft should take place on the HTTPBIS working
group mailing list (ietf-http-wg@w3.org), which is archived at group mailing list (ietf-http-wg@w3.org), which is archived at
<http://lists.w3.org/Archives/Public/ietf-http-wg/>. <http://lists.w3.org/Archives/Public/ietf-http-wg/>.
The current issues list is at The current issues list is at
<http://tools.ietf.org/wg/httpbis/trac/report/3> and related <http://tools.ietf.org/wg/httpbis/trac/report/3> and related
documents (including fancy diffs) can be found at documents (including fancy diffs) can be found at
<http://tools.ietf.org/wg/httpbis/>. <http://tools.ietf.org/wg/httpbis/>.
The changes in this draft are summarized in Appendix D.19. The changes in this draft are summarized in Appendix D.20.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 7, 2012. This Internet-Draft will expire on August 6, 2012.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2012 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 24 skipping to change at page 3, line 24
5. Header Field Definitions . . . . . . . . . . . . . . . . . . . 9 5. Header Field Definitions . . . . . . . . . . . . . . . . . . . 9
5.1. Accept-Ranges . . . . . . . . . . . . . . . . . . . . . . 9 5.1. Accept-Ranges . . . . . . . . . . . . . . . . . . . . . . 9
5.2. Content-Range . . . . . . . . . . . . . . . . . . . . . . 10 5.2. Content-Range . . . . . . . . . . . . . . . . . . . . . . 10
5.3. If-Range . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.3. If-Range . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.4. Range . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.4. Range . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.4.1. Byte Ranges . . . . . . . . . . . . . . . . . . . . . 13 5.4.1. Byte Ranges . . . . . . . . . . . . . . . . . . . . . 13
5.4.2. Range Retrieval Requests . . . . . . . . . . . . . . . 15 5.4.2. Range Retrieval Requests . . . . . . . . . . . . . . . 15
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16
6.1. Status Code Registration . . . . . . . . . . . . . . . . . 16 6.1. Status Code Registration . . . . . . . . . . . . . . . . . 16
6.2. Header Field Registration . . . . . . . . . . . . . . . . 16 6.2. Header Field Registration . . . . . . . . . . . . . . . . 16
6.3. Range Specifier Registration . . . . . . . . . . . . . . . 16 6.3. Range Specifier Registration . . . . . . . . . . . . . . . 17
7. Security Considerations . . . . . . . . . . . . . . . . . . . 17 7. Security Considerations . . . . . . . . . . . . . . . . . . . 17
7.1. Overlapping Ranges . . . . . . . . . . . . . . . . . . . . 17 7.1. Overlapping Ranges . . . . . . . . . . . . . . . . . . . . 17
8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 17 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 17
9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 17 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 17
9.1. Normative References . . . . . . . . . . . . . . . . . . . 17 9.1. Normative References . . . . . . . . . . . . . . . . . . . 17
9.2. Informative References . . . . . . . . . . . . . . . . . . 18 9.2. Informative References . . . . . . . . . . . . . . . . . . 18
Appendix A. Internet Media Type multipart/byteranges . . . . . . 18 Appendix A. Internet Media Type multipart/byteranges . . . . . . 18
Appendix B. Compatibility with Previous Versions . . . . . . . . 21 Appendix B. Compatibility with Previous Versions . . . . . . . . 21
B.1. Changes from RFC 2616 . . . . . . . . . . . . . . . . . . 21 B.1. Changes from RFC 2616 . . . . . . . . . . . . . . . . . . 21
Appendix C. Collected ABNF . . . . . . . . . . . . . . . . . . . 22 Appendix C. Collected ABNF . . . . . . . . . . . . . . . . . . . 22
skipping to change at page 4, line 8 skipping to change at page 4, line 8
D.10. Since draft-ietf-httpbis-p5-range-08 . . . . . . . . . . . 25 D.10. Since draft-ietf-httpbis-p5-range-08 . . . . . . . . . . . 25
D.11. Since draft-ietf-httpbis-p5-range-09 . . . . . . . . . . . 25 D.11. Since draft-ietf-httpbis-p5-range-09 . . . . . . . . . . . 25
D.12. Since draft-ietf-httpbis-p5-range-10 . . . . . . . . . . . 25 D.12. Since draft-ietf-httpbis-p5-range-10 . . . . . . . . . . . 25
D.13. Since draft-ietf-httpbis-p5-range-11 . . . . . . . . . . . 25 D.13. Since draft-ietf-httpbis-p5-range-11 . . . . . . . . . . . 25
D.14. Since draft-ietf-httpbis-p5-range-12 . . . . . . . . . . . 26 D.14. Since draft-ietf-httpbis-p5-range-12 . . . . . . . . . . . 26
D.15. Since draft-ietf-httpbis-p5-range-13 . . . . . . . . . . . 26 D.15. Since draft-ietf-httpbis-p5-range-13 . . . . . . . . . . . 26
D.16. Since draft-ietf-httpbis-p5-range-14 . . . . . . . . . . . 26 D.16. Since draft-ietf-httpbis-p5-range-14 . . . . . . . . . . . 26
D.17. Since draft-ietf-httpbis-p5-range-15 . . . . . . . . . . . 26 D.17. Since draft-ietf-httpbis-p5-range-15 . . . . . . . . . . . 26
D.18. Since draft-ietf-httpbis-p5-range-16 . . . . . . . . . . . 26 D.18. Since draft-ietf-httpbis-p5-range-16 . . . . . . . . . . . 26
D.19. Since draft-ietf-httpbis-p5-range-17 . . . . . . . . . . . 26 D.19. Since draft-ietf-httpbis-p5-range-17 . . . . . . . . . . . 26
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 D.20. Since draft-ietf-httpbis-p5-range-18 . . . . . . . . . . . 26
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1. Introduction 1. Introduction
HTTP clients often encounter interrupted data transfers as a result HTTP clients often encounter interrupted data transfers as a result
of cancelled requests or dropped connections. When a client has of cancelled requests or dropped connections. When a client has
stored a partial representation, it is desirable to request the stored a partial representation, it is desirable to request the
remainder of that representation in a subsequent request rather than remainder of that representation in a subsequent request rather than
transfer the entire representation. There are also a number of Web transfer the entire representation. There are also a number of Web
applications that benefit from being able to request only a subset of applications that benefit from being able to request only a subset of
a larger representation, such as a single page of a very large a larger representation, such as a single page of a very large
skipping to change at page 6, line 13 skipping to change at page 6, line 13
define specific error handling mechanisms, except in cases where it define specific error handling mechanisms, except in cases where it
has direct impact on security. This is because different uses of the has direct impact on security. This is because different uses of the
protocol require different error handling strategies; for example, a protocol require different error handling strategies; for example, a
Web browser may wish to transparently recover from a response where Web browser may wish to transparently recover from a response where
the Location header field doesn't parse according to the ABNF, the Location header field doesn't parse according to the ABNF,
whereby in a systems control protocol using HTTP, this type of error whereby in a systems control protocol using HTTP, this type of error
recovery could lead to dangerous consequences. recovery could lead to dangerous consequences.
1.2. Syntax Notation 1.2. Syntax Notation
This specification uses the ABNF syntax defined in Section 1.2 of This specification uses the Augmented Backus-Naur Form (ABNF)
[Part1] (which extends the syntax defined in [RFC5234] with a list notation of [RFC5234] with the list rule extension defined in Section
rule). Appendix C shows the collected ABNF, with the list rule 1.2 of [Part1]. Appendix C shows the collected ABNF with the list
expanded. rule expanded.
The following core rules are included by reference, as defined in The following core rules are included by reference, as defined in
[RFC5234], Appendix B.1: ALPHA (letters), CR (carriage return), CRLF [RFC5234], Appendix B.1: ALPHA (letters), CR (carriage return), CRLF
(CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote),
HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit
sequence of data), SP (space), and VCHAR (any visible US-ASCII sequence of data), SP (space), and VCHAR (any visible US-ASCII
character). character).
Note that all rules derived from token are to be compared case- Note that all rules derived from token are to be compared case-
insensitively, like range-unit and acceptable-ranges. insensitively, like range-unit and acceptable-ranges.
1.2.1. Core Rules 1.2.1. Core Rules
The core rules below are defined in [Part1] and [Part2]: The core rules below are defined in [Part1] and [Part2]:
OWS = <OWS, defined in [Part1], Section 1.2.2> OWS = <OWS, defined in [Part1], Section 3.2.1>
token = <token, defined in [Part1], Section 3.2.3> token = <token, defined in [Part1], Section 3.2.4>
HTTP-date = <HTTP-date, defined in [Part2], Section 8> HTTP-date = <HTTP-date, defined in [Part2], Section 8>
1.2.2. ABNF Rules defined in other Parts of the Specification 1.2.2. ABNF Rules defined in other Parts of the Specification
The ABNF rules below are defined in other parts: The ABNF rules below are defined in other parts:
entity-tag = <entity-tag, defined in [Part4], Section 2.3> entity-tag = <entity-tag, defined in [Part4], Section 2.3>
2. Range Units 2. Range Units
skipping to change at page 8, line 17 skipping to change at page 8, line 17
o Cache-Control, ETag, Expires, Content-Location, Last-Modified, o Cache-Control, ETag, Expires, Content-Location, Last-Modified,
and/or Vary, if the header field would have been sent in a 200 and/or Vary, if the header field would have been sent in a 200
response to the same request response to the same request
If the 206 response is the result of an If-Range request, the If the 206 response is the result of an If-Range request, the
response SHOULD NOT include other representation header fields. response SHOULD NOT include other representation header fields.
Otherwise, the response MUST include all of the representation header Otherwise, the response MUST include all of the representation header
fields that would have been returned with a 200 (OK) response to the fields that would have been returned with a 200 (OK) response to the
same request. same request.
Caches MAY use a heuristic (see Section 2.3.1.1 of [Part6]) to
determine freshness for 206 responses.
3.2. 416 Requested Range Not Satisfiable 3.2. 416 Requested Range Not Satisfiable
A server SHOULD return a response with this status code if a request A server SHOULD return a response with this status code if a request
included a Range header field (Section 5.4), and none of the ranges- included a Range header field (Section 5.4), and none of the ranges-
specifier values in this field overlap the current extent of the specifier values in this field overlap the current extent of the
selected resource, and the request did not include an If-Range header selected resource, and the request did not include an If-Range header
field (Section 5.3). (For byte-ranges, this means that the first- field (Section 5.3). (For byte-ranges, this means that the first-
byte-pos of all of the byte-range-spec values were greater than the byte-pos of all of the byte-range-spec values were greater than the
current length of the selected resource.) current length of the selected resource.)
skipping to change at page 17, line 40 skipping to change at page 17, line 48
See Section 11 of [Part1]. See Section 11 of [Part1].
9. References 9. References
9.1. Normative References 9.1. Normative References
[Part1] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., [Part1] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed.,
and J. Reschke, Ed., "HTTP/1.1, part 1: URIs, Connections, and J. Reschke, Ed., "HTTP/1.1, part 1: URIs, Connections,
and Message Parsing", draft-ietf-httpbis-p1-messaging-18 and Message Parsing",
(work in progress), January 2012. draft-ietf-httpbis-p1-messaging-latest (work in progress),
February 2012.
[Part2] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., [Part2] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed.,
and J. Reschke, Ed., "HTTP/1.1, part 2: Message and J. Reschke, Ed., "HTTP/1.1, part 2: Message
Semantics", draft-ietf-httpbis-p2-semantics-18 (work in Semantics", draft-ietf-httpbis-p2-semantics-latest (work
progress), January 2012. in progress), February 2012.
[Part4] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H., [Part4] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed., Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed.,
and J. Reschke, Ed., "HTTP/1.1, part 4: Conditional and J. Reschke, Ed., "HTTP/1.1, part 4: Conditional
Requests", draft-ietf-httpbis-p4-conditional-18 (work in Requests", draft-ietf-httpbis-p4-conditional-latest (work
progress), January 2012. in progress), February 2012.
[Part6] Fielding, R., Ed., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., Berners-Lee, T., Lafon, Y., Ed.,
Nottingham, M., Ed., and J. Reschke, Ed., "HTTP/1.1, part
6: Caching", draft-ietf-httpbis-p6-cache-latest (work in
progress), February 2012.
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046, Extensions (MIME) Part Two: Media Types", RFC 2046,
November 1996. November 1996.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008. Specifications: ABNF", STD 68, RFC 5234, January 2008.
skipping to change at page 22, line 15 skipping to change at page 22, line 15
Appendix C. Collected ABNF Appendix C. Collected ABNF
Accept-Ranges = acceptable-ranges Accept-Ranges = acceptable-ranges
Content-Range = byte-content-range-spec / other-content-range-spec Content-Range = byte-content-range-spec / other-content-range-spec
HTTP-date = <HTTP-date, defined in [Part2], Section 8> HTTP-date = <HTTP-date, defined in [Part2], Section 8>
If-Range = entity-tag / HTTP-date If-Range = entity-tag / HTTP-date
OWS = <OWS, defined in [Part1], Section 1.2.2> OWS = <OWS, defined in [Part1], Section 3.2.1>
Range = byte-ranges-specifier / other-ranges-specifier Range = byte-ranges-specifier / other-ranges-specifier
acceptable-ranges = ( *( "," OWS ) range-unit *( OWS "," [ OWS acceptable-ranges = ( *( "," OWS ) range-unit *( OWS "," [ OWS
range-unit ] ) ) / "none" range-unit ] ) ) / "none"
byte-content-range-spec = bytes-unit SP byte-range-resp-spec "/" ( byte-content-range-spec = bytes-unit SP byte-range-resp-spec "/" (
instance-length / "*" ) instance-length / "*" )
byte-range-resp-spec = ( first-byte-pos "-" last-byte-pos ) / "*" byte-range-resp-spec = ( first-byte-pos "-" last-byte-pos ) / "*"
byte-range-set = ( *( "," OWS ) byte-range-spec ) / ( byte-range-set = ( *( "," OWS ) byte-range-spec ) / (
skipping to change at page 22, line 51 skipping to change at page 22, line 51
other-range-resp-spec = *CHAR other-range-resp-spec = *CHAR
other-range-set = 1*CHAR other-range-set = 1*CHAR
other-range-unit = token other-range-unit = token
other-ranges-specifier = other-range-unit "=" other-range-set other-ranges-specifier = other-range-unit "=" other-range-set
range-unit = bytes-unit / other-range-unit range-unit = bytes-unit / other-range-unit
suffix-byte-range-spec = "-" suffix-length suffix-byte-range-spec = "-" suffix-length
suffix-length = 1*DIGIT suffix-length = 1*DIGIT
token = <token, defined in [Part1], Section 3.2.3> token = <token, defined in [Part1], Section 3.2.4>
ABNF diagnostics: ABNF diagnostics:
; Accept-Ranges defined but not used ; Accept-Ranges defined but not used
; Content-Range defined but not used ; Content-Range defined but not used
; If-Range defined but not used ; If-Range defined but not used
; Range defined but not used ; Range defined but not used
Appendix D. Change Log (to be removed by RFC Editor before publication) Appendix D. Change Log (to be removed by RFC Editor before publication)
D.1. Since RFC 2616 D.1. Since RFC 2616
skipping to change at page 26, line 47 skipping to change at page 26, line 47
o <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/301>: "Content- o <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/301>: "Content-
Range on responses other than 206" Range on responses other than 206"
o <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/319>: "case o <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/319>: "case
sensitivity of ranges in p5" sensitivity of ranges in p5"
D.19. Since draft-ietf-httpbis-p5-range-17 D.19. Since draft-ietf-httpbis-p5-range-17
None. None.
D.20. Since draft-ietf-httpbis-p5-range-18
None yet.
Index Index
2 2
206 Partial Content (status code) 7 206 Partial Content (status code) 7
4 4
416 Requested Range Not Satisfiable (status code) 8 416 Requested Range Not Satisfiable (status code) 8
A A
Accept-Ranges header field 9 Accept-Ranges header field 9
 End of changes. 16 change blocks. 
21 lines changed or deleted 36 lines changed or added

This html diff was produced by rfcdiff 1.38. The latest version is available from http://tools.ietf.org/tools/rfcdiff/