Internet DRAFT - draft-combs-http-indeterminate-range

draft-combs-http-indeterminate-range



Network Working Group                                   J. R. Combs, Ed.
Internet-Draft                                                      Plex
Updates: 7233                                         September 21, 2015
(if approved)
Intended status: Standards Track
Expires: March 24, 2016


           HTTP/1.1: Range Responses of Indeterminate Length
                draft-combs-http-indeterminate-range-02

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 March 24, 2016.

Copyright Notice

   Copyright (c) 2015 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 March 24, 2016                 [Page 1]

Internet-Draft      HTTP/1.1 Extended Range Requests      September 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 RFC 7233,
   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
     4.1. Header Field Registration  . . . . . . . . . . . . . . . . 5
   5. Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 5
   6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6
     6.1. Normative References . . . . . . . . . . . . . . . . . . . 6
     6.2. Informative References . . . . . . . . . . . . . . . . . . 6
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . . 6


Combs                    Expires March 24, 2016                 [Page 2]

Internet-Draft      HTTP/1.1 Extended Range Requests      September 2015


1. Introduction

   This document will define changes to [RFC7233] 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.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
   NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   [RFC2119].

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 [RFC7233].


     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 March 24, 2016                 [Page 3]

Internet-Draft      HTTP/1.1 Extended Range Requests      September 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)

   Request and response range values for an example use-case, in which
   a growing media file is streamed to the client:

     Client requests the whole stream:
      Range: 0-

     Server begins a response of unknown size:
      bytes 0-*/*

     User seeks in the stream; client closes previous connection and
     requests the seek offset (possibly repeating multiple times to
     find the desired offset):
      Range: 32768-

     Server begins a response of unknown size, at the requested offset:
      bytes 32768-*/*


Combs                    Expires March 24, 2016                 [Page 4]

Internet-Draft      HTTP/1.1 Extended Range Requests      September 2015


3. Security Considerations

   No additional security considerations have been identified beyond
   those applicable to HTTP range requests in general [RFC7233].


4. IANA Considerations

4.1. Header Field Registration

   HTTP header fields are registered within the "Message Headers"
   registry maintained at
   <http://www.iana.org/assignments/message-headers/>.

   This document defines or updates the following HTTP header fields, so
   their associated registry entries shall be updated according to the
   permanent registrations below (see [BCP90]):

   +--------------------------+----------+----------+-------------+
   | Header Field Name        | Protocol | Status   | Reference   |
   +--------------------------+----------+----------+-------------+
   | Accept-Indefinite-Ranges | http     | standard | Section 2.1 |
   | Content-Range            | http     | standard | Section 2.2 |
   +--------------------------+----------+----------+-------------+

   The change controller is: "IETF (iesg@ietf.org) - Internet
   Engineering Task Force".


5. Acknowledgments

   Parts of this document are based on [RFC7233] and its drafts.


Combs                    Expires March 24, 2016                 [Page 5]

Internet-Draft      HTTP/1.1 Extended Range Requests      September 2015


6. References

6.1. Normative References


   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC7233]  Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed.,
              "Hypertext Transfer Protocol (HTTP/1.1): Range
              Requests", RFC 7233, June 2014.

6.2. Informative References

   [BCP90]    Klyne, G., Nottingham, M., and J. Mogul, "Registration
              Procedures for Message Header Fields", BCP 90, RFC 3864,
              September 2004.

Authors' Addresses

   J. Rodger Combs (editor)
   Plex, Inc.

   Email: rodger@plex.tv


Combs                    Expires March 24, 2016                 [Page 6]