draft-ietf-httpbis-rand-access-live-03.txt   draft-ietf-httpbis-rand-access-live-latest.txt 
HTTP Working Group C. Pratt HTTP Working Group C. Pratt
Internet-Draft Internet-Draft
Intended status: Experimental B. Stark Intended status: Experimental D. Thakore
Expires: September 21, 2018 AT&T Expires: September 2, 2018 CableLabs
D. Thakore B. Stark
CableLabs AT&T
March 20, 2018 March 1, 2018
HTTP Random Access and Live Content HTTP Random Access and Live Content
draft-ietf-httpbis-rand-access-live-03 draft-ietf-httpbis-rand-access-live-latest
Abstract Abstract
To accommodate byte range requests for content that has data appended To accommodate byte range requests for content that has data appended
over time, this document defines semantics that allow a HTTP client over time, this document defines semantics that allow a HTTP client
and server to perform byte-range GET and HEAD requests that start at and server to perform byte-range GET and HEAD requests that start at
an arbitrary byte offset within the representation and ends at an an arbitrary byte offset within the representation and ends at an
indeterminate offset. indeterminate offset.
Editorial Note (To be removed by RFC Editor before publication) Editorial Note (To be removed by RFC Editor before publication)
skipping to change at page 1, line 47 skipping to change at page 1, line 47
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 https://datatracker.ietf.org/drafts/current/. Drafts is at https://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 September 21, 2018. This Internet-Draft will expire on September 2, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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
(https://trustee.ietf.org/license-info) in effect on the date of (https://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 2, line 33 skipping to change at page 2, line 33
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3
1.2. Notational Conventions . . . . . . . . . . . . . . . . . 3 1.2. Notational Conventions . . . . . . . . . . . . . . . . . 3
2. Performing Range requests on Random-Access Aggregating 2. Performing Range requests on Random-Access Aggregating
("live") Content . . . . . . . . . . . . . . . . . . . . . . 3 ("live") Content . . . . . . . . . . . . . . . . . . . . . . 3
2.1. Establishing the Randomly Accessible Byte Range . . . . . 4 2.1. Establishing the Randomly Accessible Byte Range . . . . . 4
2.2. Byte-Range Requests Beyond the Randomly Accessible Byte 2.2. Byte-Range Requests Beyond the Randomly Accessible Byte
Range . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Range . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3. Other Applications of Random-Access Aggregating Content . . . 7 3. Other Applications of Random-Access Aggregating Content . . . 7
3.1. Requests Starting at the Aggregation ("Live") Point . . . 7 3.1. Requests Starting at the Aggregation ("Live") Point . . . 7
3.2. Shift Buffer Representations . . . . . . . . . . . . . . 8 3.2. Shift Buffer Representations . . . . . . . . . . . . . . 8
4. Security Considerations . . . . . . . . . . . . . . . . . . . 9 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9
5. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 5. Security Considerations . . . . . . . . . . . . . . . . . . . 9
5.1. Normative References . . . . . . . . . . . . . . . . . . 10 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2. Informative References . . . . . . . . . . . . . . . . . 10 6.1. Normative References . . . . . . . . . . . . . . . . . . 10
6.2. Informative References . . . . . . . . . . . . . . . . . 10
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 11 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 11
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11
1. Introduction 1. Introduction
Some Hypertext Transfer Protocol (HTTP) clients use byte-range Some Hypertext Transfer Protocol (HTTP) clients use byte-range
requests (Range requests using the "bytes" Range Unit) to transfer requests (Range requests using the "bytes" Range Unit) to transfer
select portions of large representations ([RFC7233]). And in some select portions of large representations ([RFC7233]). And in some
cases large representations require content to be continuously or cases large representations require content to be continuously or
periodically appended - such as representations consisting of live periodically appended - such as representations consisting of live
skipping to change at page 3, line 52 skipping to change at page 3, line 52
This document cites productions in Augmented Backus-Naur Form (ABNF) This document cites productions in Augmented Backus-Naur Form (ABNF)
productions from [RFC7233], using the notation defined in [RFC5234]. productions from [RFC7233], using the notation defined in [RFC5234].
2. Performing Range requests on Random-Access Aggregating ("live") 2. Performing Range requests on Random-Access Aggregating ("live")
Content Content
This document recommends a two-step process for accessing resources This document recommends a two-step process for accessing resources
that have indeterminate length representations. that have indeterminate length representations.
Two steps are necessary because of limitations with the Range request Two steps are necessary because of limitations with the Range request
header and the Content-Range response header fields. A server cannot header fields and the Content-Range response header fields. A server
know from a range request that a client wishes to receive a response cannot know from a range request that a client wishes to receive a
that does not have a definite end. More critically, the header response that does not have a definite end. More critically, the
fields do not allow the server to signal that a resource has header fields do not allow the server to signal that a resource has
indeterminate length without also providing a fixed portion of the indeterminate length without also providing a fixed portion of the
resource. resource.
A client first learns that the resource has a representation of A client first learns that the resource has a representation of
indeterminate length by requesting a range of the resource. The indeterminate length by requesting a range of the resource. The
server responds with the range that is available, but indicates that server responds with the range that is available, but indicates that
the length of the representation is unknown using the existing the length of the representation is unknown using the existing
Content-Range syntax. See Section 2.1 for details and examples. Content-Range syntax. See Section 2.1 for details and examples.
Once the client knows the resource has indeterminate length, it can Once the client knows the resource has indeterminate length, it can
skipping to change at page 4, line 40 skipping to change at page 4, line 40
determined using the existing definition for an open-ended byte-range determined using the existing definition for an open-ended byte-range
request. Specifically, Section 2.1 of [RFC7233] defines a byte-range request. Specifically, Section 2.1 of [RFC7233] defines a byte-range
request of the form: request of the form:
byte-range-spec = first-byte-pos "-" [ last-byte-pos ] byte-range-spec = first-byte-pos "-" [ last-byte-pos ]
which allows a client to send a HEAD request with a first-byte-pos which allows a client to send a HEAD request with a first-byte-pos
and leave last-byte-pos absent. A server that receives a satisfiable and leave last-byte-pos absent. A server that receives a satisfiable
byte-range request (with first-byte-pos smaller than the current byte-range request (with first-byte-pos smaller than the current
representation length) may respond with a 206 status code (Partial representation length) may respond with a 206 status code (Partial
Content) with a Content-Range header indicating the currently Content) with a Content-Range header field indicating the currently
satisfiable byte range. For example: satisfiable byte range. For example:
HEAD /resource HTTP/1.1 HEAD /resource HTTP/1.1
Host: example.com Host: example.com
Range: bytes=0- Range: bytes=0-
returns a response of the form: returns a response of the form:
HTTP/1.1 206 Partial Content HTTP/1.1 206 Partial Content
Content-Range: bytes 0-1234567/* Content-Range: bytes 0-1234567/*
skipping to change at page 5, line 29 skipping to change at page 5, line 29
an indefinite "live" point - a point where the byte-range GET request an indefinite "live" point - a point where the byte-range GET request
is fulfilled on-demand as the content is aggregated. is fulfilled on-demand as the content is aggregated.
For example, for a large video asset, a client may wish to start a For example, for a large video asset, a client may wish to start a
content transfer from the video "key" frame immediately before the content transfer from the video "key" frame immediately before the
point of aggregation and continue the content transfer indefinitely point of aggregation and continue the content transfer indefinitely
as content is aggregated - in order to support low-latency startup of as content is aggregated - in order to support low-latency startup of
a live video stream. a live video stream.
Unlike a byte-range Range request, a byte-range Content-Range Unlike a byte-range Range request, a byte-range Content-Range
response header cannot be "open ended", per Section 4.2 of [RFC7233]: response header field cannot be "open ended", per Section 4.2 of
[RFC7233]:
byte-content-range = bytes-unit SP byte-content-range = bytes-unit SP
( byte-range-resp / unsatisfied-range ) ( byte-range-resp / unsatisfied-range )
byte-range-resp = byte-range "/" ( complete-length / "*" ) byte-range-resp = byte-range "/" ( complete-length / "*" )
byte-range = first-byte-pos "-" last-byte-pos byte-range = first-byte-pos "-" last-byte-pos
unsatisfied-range = "*/" complete-length unsatisfied-range = "*/" complete-length
complete-length = 1*DIGIT complete-length = 1*DIGIT
Specifically, last-byte-pos is required in byte-range. So in order Specifically, last-byte-pos is required in byte-range. So in order
to preserve interoperability with existing HTTP clients, servers, to preserve interoperability with existing HTTP clients, servers,
proxies, and caches, this document proposes a mechanism for a client proxies, and caches, this document proposes a mechanism for a client
to indicate support for handling an indeterminate-length byte-range to indicate support for handling an indeterminate-length byte-range
response, and a mechanism for a server to indicate if/when it's response, and a mechanism for a server to indicate if/when it's
providing a indeterminate-length response. providing a indeterminate-length response.
A client can indicate support for handling indeterminate-length byte- A client can indicate support for handling indeterminate-length byte-
range responses by providing a Very Large Value for the last-byte-pos range responses by providing a very large value for the last-byte-pos
in the byte-range request. For example, a client can perform a byte- in the byte-range request. For example, a client can perform a byte-
range GET request of the form: range GET request of the form:
GET /resource HTTP/1.1 GET /resource HTTP/1.1
Host: example.com Host: example.com
Range: bytes=1230000-999999999999 Range: bytes=1230000-999999999999
where the last-byte-pos in the Request is much larger than the last- where the last-byte-pos in the Request is much larger than the last-
byte-pos returned in response to an open-ended byte-range HEAD byte-pos returned in response to an open-ended byte-range HEAD
request, as described above. request, as described above, and much larger than the expected
maximum size of the representation. See Section 5 for range value
considerations.
In response, a server may indicate that it is supplying a In response, a server may indicate that it is supplying a
continuously aggregating ("live") response by supplying the client continuously aggregating ("live") response by supplying the client
request's last-byte-pos in the Content-Range response header. request's last-byte-pos in the Content-Range response header field.
For example: For example:
GET /resource HTTP/1.1 GET /resource HTTP/1.1
Host: example.com Host: example.com
Range: bytes=1230000-999999999999 Range: bytes=1230000-999999999999
returns returns
HTTP/1.1 206 Partial Content HTTP/1.1 206 Partial Content
skipping to change at page 7, line 13 skipping to change at page 7, line 16
1230000 and end at byte 1234567 and will not include any aggregated 1230000 and end at byte 1234567 and will not include any aggregated
content. This is the response expected from a typical HTTP server - content. This is the response expected from a typical HTTP server -
one that doesn't support byte-range requests on aggregating content. one that doesn't support byte-range requests on aggregating content.
A client that doesn't receive a response indicating it is A client that doesn't receive a response indicating it is
continuously aggregating must use other means to access aggregated continuously aggregating must use other means to access aggregated
content (e.g. periodic byte-range polling). content (e.g. periodic byte-range polling).
A server that does return a continuously aggregating ("live") A server that does return a continuously aggregating ("live")
response should return data using chunked transfer coding and not response should return data using chunked transfer coding and not
provide a Content-Length header. A 0-length chunk indicates the end provide a Content-Length header field. A 0-length chunk indicates
of the transfer, per Section 4.1 of [RFC7230]. the end of the transfer, per Section 4.1 of [RFC7230].
3. Other Applications of Random-Access Aggregating Content 3. Other Applications of Random-Access Aggregating Content
3.1. Requests Starting at the Aggregation ("Live") Point 3.1. Requests Starting at the Aggregation ("Live") Point
A client that wishes to only receive newly-aggregated portions of a A client that wishes to only receive newly-aggregated portions of a
resource (i.e., start at the "live" point), can use a HEAD request to resource (i.e., start at the "live" point), can use a HEAD request to
learn what range the server has currently available and initiate an learn what range the server has currently available and initiate an
indeterminate-length transfer. For example: indeterminate-length transfer. For example:
HEAD /resource HTTP/1.1 HEAD /resource HTTP/1.1
Host: example.com Host: example.com
Range: bytes=0- Range: bytes=0-
With the Content-Range response header indicating the (or ranges) With the Content-Range response header field indicating the range (or
available. For example: ranges) available. For example:
206 Partial Content 206 Partial Content
Content-Range: bytes 0-1234567/* Content-Range: bytes 0-1234567/*
The client can then issue a request for a range starting at the end The client can then issue a request for a range starting at the end
value (using a very large value for the end of a range) and receive value (using a very large value for the end of a range) and receive
only new content. only new content.
GET /resource HTTP/1.1 GET /resource HTTP/1.1
Host: example.com Host: example.com
skipping to change at page 9, line 42 skipping to change at page 9, line 42
representation is being returned in the response body. However GET representation is being returned in the response body. However GET
requests without a Range header cannot be cached since the first byte requests without a Range header cannot be cached since the first byte
of the response body can vary from request to request. To ensure of the response body can vary from request to request. To ensure
Range-less GET requests against shift-buffer representations are not Range-less GET requests against shift-buffer representations are not
cached, servers hosting a shift-buffer representation should either cached, servers hosting a shift-buffer representation should either
not return a 200-level response (e.g. sending a 300-level redirect not return a 200-level response (e.g. sending a 300-level redirect
response with a URI that represents the current start of the shift- response with a URI that represents the current start of the shift-
buffer) or indicate the response is non-cacheable. See HTTP Caching buffer) or indicate the response is non-cacheable. See HTTP Caching
([RFC7234]) for details on HTTP cache control. ([RFC7234]) for details on HTTP cache control.
4. Security Considerations 4. IANA Considerations
This document has no actions for IANA.
5. Security Considerations
One potential issue with this recommendation is related to the use of One potential issue with this recommendation is related to the use of
very-large last-byte-pos values. Some client and server very-large last-byte-pos values. Some client and server
implementations may not be prepared to deal with byte position values implementations may not be prepared to deal with byte position values
of 2^^63 and beyond. So in applications where there's no expectation of 2^63 and beyond. So in applications where there's no expectation
that the representation will ever exceed 2^^63, a value smaller than that the representation will ever exceed 2^63, a value smaller than
this value should be used as the Very Large last-byte-pos in a byte- this value should be used as the very large last-byte-pos in a byte-
seek request or content-range response. Also, some implementations seek request or content-range response. Also, some implementations
(e.g. JavaScript-based clients and servers) are not able to (e.g. JavaScript-based clients and servers) are not able to
represent all values beyond 2^^53. So similarly, if there's no represent all values beyond 2^53. So similarly, if there's no
expectation that a representation will ever exceed 2^^53 bytes, expectation that a representation will ever exceed 2^53 bytes, values
values smaller than this limit should be used for the last-byte-pos smaller than this limit should be used for the last-byte-pos in byte-
in byte-range requests. range requests.
5. References 6. References
5.1. Normative References 6.1. Normative References
[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, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing", Protocol (HTTP/1.1): Message Syntax and Routing",
RFC 7230, DOI 10.17487/RFC7230, June 2014, RFC 7230, DOI 10.17487/RFC7230, June 2014,
<https://www.rfc-editor.org/info/rfc7230>. <https://www.rfc-editor.org/info/rfc7230>.
skipping to change at page 10, line 33 skipping to change at page 10, line 37
[RFC7233] Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., [RFC7233] Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed.,
"Hypertext Transfer Protocol (HTTP/1.1): Range Requests", "Hypertext Transfer Protocol (HTTP/1.1): Range Requests",
RFC 7233, DOI 10.17487/RFC7233, June 2014, RFC 7233, DOI 10.17487/RFC7233, June 2014,
<https://www.rfc-editor.org/info/rfc7233>. <https://www.rfc-editor.org/info/rfc7233>.
[RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,
Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching",
RFC 7234, DOI 10.17487/RFC7234, June 2014, RFC 7234, DOI 10.17487/RFC7234, June 2014,
<https://www.rfc-editor.org/info/rfc7234>. <https://www.rfc-editor.org/info/rfc7234>.
5.2. Informative References 6.2. Informative References
[DASH] ISO, "Information technology -- Dynamic adaptive streaming [DASH] ISO, "Information technology -- Dynamic adaptive streaming
over HTTP (DASH) -- Part 1: Media presentation description over HTTP (DASH) -- Part 1: Media presentation description
and segment formats", ISO/IEC 23009-1:2014, May 2014, and segment formats", ISO/IEC 23009-1:2014, May 2014,
<http://standards.iso.org/ittf/PubliclyAvailableStandards/ <http://standards.iso.org/ittf/PubliclyAvailableStandards/
c065274_ISO_IEC_23009-1_2014.zip>. c065274_ISO_IEC_23009-1_2014.zip>.
[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, Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008, DOI 10.17487/RFC5234, January 2008,
skipping to change at page 11, line 19 skipping to change at page 11, line 23
Roy T. Fielding, Jeremy Poulter. Roy T. Fielding, Jeremy Poulter.
Authors' Addresses Authors' Addresses
Craig Pratt Craig Pratt
Portland, OR 97229 Portland, OR 97229
US US
Email: pratt@acm.org Email: pratt@acm.org
Barbara Stark
AT&T
Atlanta, GA
US
Email: barbara.stark@att.com
Darshak Thakore Darshak Thakore
CableLabs CableLabs
858 Coal Creek Circle 858 Coal Creek Circle
Louisville, CO 80027 Louisville, CO 80027
US
Email: d.thakore@cablelabs.com Email: d.thakore@cablelabs.com
Barbara Stark
AT&T
Atlanta, GA
US
Email: barbara.stark@att.com
 End of changes. 21 change blocks. 
42 lines changed or deleted 44 lines changed or added

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