Network Working Group J. R. Combs, Ed. Internet-Draft Plex Updates: 7233 March 24, 2015 (if approved) Intended status: Standards Track Expires: September 25, 2015 HTTP/1.1: Range Responses of Indeterminate Length draft-combs-http-indeterminate-range-00 Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on September 25, 2015. Copyright Notice Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Combs Expires September 25, 2015 [Page 1] Internet-Draft HTTP/1.1 March 2015 Abstract 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 updates Part 5 of the eight-part specification that defines the protocol referred to as "HTTP/1.1". Part 5 defines range-specific requests and the rules for constructing and combining responses to those requests. This document improves support for responding to range requests for resources of indeterminate size. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Header Field Definitions . . . . . . . . . . . . . . . . . . . 3 2.1. Accept-Indefinite-Ranges . . . . . . . . . . . . . . . . . 3 2.2. Content-Range . . . . . . . . . . . . . . . . . . . . . . 3 3. Security Considerations . . . . . . . . . . . . . . . . . . . 5 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 5. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 5 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 5 Combs Expires September 25, 2015 [Page 2] Internet-Draft HTTP/1.1 March 2015 1. Introduction This document will define changes to RFC 7233 HTTP/1.1 designed to allow range requests to be used to retrieve parts of resources whose lengths are unknown at the time of the first request. 2. Header Field Definitions This section defines the syntax and semantics of all standard HTTP/1.1 header fields. For entity-header fields, both sender and recipient refer to either the client or the server, depending on who sends and who receives the entity. 2.1. Accept-Indefinite-Ranges The Accept-Indefinite-Ranges request-header field allows the client to indicate its acceptance of indefinite-sized range requests for a resource: Accept-Indefinite-Ranges = "Accept-Indefinite-Ranges" ":" "1" Servers MUST NOT generate indefinite-sized byte-range replies without having received this header, with the value "1", for the resource involved. 2.2. Content-Range The Content-Range entity-header is sent with a partial entity-body to specify where in the full entity-body the partial body should be applied. This section updates Section 4.2 of RFC 7233. Content-Range = byte-content-range / other-content-range byte-content-range = bytes-unit SP ( byte-range-resp / unsatisfied-range ) byte-range-resp = byte-range "/" ( complete-length / "*" ) byte-range = first-byte-pos "-" (last-byte-pos / "*" ) unsatisfied-range = "*/" ( complete-length / "*" ) complete-length = 1*DIGIT other-content-range = other-range-unit SP other-range-resp other-range-resp = *CHAR Combs Expires September 25, 2015 [Page 3] Internet-Draft HTTP/1.1 March 2015 For byte ranges, a sender SHOULD indicate the complete length of the representation from which the range has been extracted, unless the complete length is unknown or difficult to determine. An asterisk character ("*") in place of the complete-length indicates that the representation length was unknown when the header field was generated. An asterisk character in place of the last-byte-pos indicates that the response length was unknown when the header was generated, and that the entire requested range of the resource will be sent. An asterisk character may be used in place of the last-byte-pos ONLY if the Accept-Indefinite-Ranges header was sent, and requires use of the RFC 7230 Chunked Transfer-Encoding The following example illustrates when the complete length of the selected representation is known by the sender to be 1234 bytes: Content-Range: bytes 42-1233/1234 and this second example illustrates when the complete length is unknown: Content-Range: bytes 42-1233/* OR Content-Range: bytes 42-*/* (if the Accept-Indefinite-Ranges request header was sent) Examples of byte-content-range-spec values, assuming that the entity contains a total of 1234 bytes: o The first 500 bytes: bytes 0-499/1234 o The second 500 bytes: bytes 500-999/1234 o All except for the first 500 bytes: bytes 500-1233/1234 Combs Expires September 25, 2015 [Page 4] Internet-Draft HTTP/1.1 March 2015 o The last 500 bytes: bytes 734-1233/1234 o The last 500 bytes, Chunked, where the length was unknown: bytes 734-*/* 3. Security Considerations No additional security considerations have been identified beyond those applicable to HTTP in general [Part 1]. 4. IANA Considerations TBD 5. Acknowledgments Parts of this document are based on RFC 7233 and its drafts. Authors' Addresses J. Rodger Combs (editor) Plex, Inc. Email: rodger@plex.tv Combs Expires September 25, 2015 [Page 5]