Re: Issue with "bytes" Range Unit and live streaming

Remy Lebeau <remy@lebeausoftware.org> Fri, 15 April 2016 21:10 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 40F2F12E0B7 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 15 Apr 2016 14:10:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.916
X-Spam-Level:
X-Spam-Status: No, score=-7.916 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.996, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4U5gKIHt2lQc for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 15 Apr 2016 14:10:17 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BA1FA12DE9E for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 15 Apr 2016 14:10:16 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1arAvs-00078N-4N for ietf-http-wg-dist@listhub.w3.org; Fri, 15 Apr 2016 21:05:40 +0000
Resent-Date: Fri, 15 Apr 2016 21:05:40 +0000
Resent-Message-Id: <E1arAvs-00078N-4N@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <remy@lebeausoftware.org>) id 1arAvo-00075d-8f for ietf-http-wg@listhub.w3.org; Fri, 15 Apr 2016 21:05:36 +0000
Received: from p3plsmtpa09-09.prod.phx3.secureserver.net ([173.201.193.238]) by maggie.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <remy@lebeausoftware.org>) id 1arAvn-0001eH-2h for ietf-http-wg@w3.org; Fri, 15 Apr 2016 21:05:35 +0000
Received: from [192.168.1.13] ([108.184.46.71]) by p3plsmtpa09-09.prod.phx3.secureserver.net with id il571s0011Y8uW401l57bY; Fri, 15 Apr 2016 14:05:07 -0700
To: ietf-http-wg@w3.org
References: <57102718.7010900@ecaspia.com> <571041E0.5020401@lebeausoftware.org> <2D09D61DDFA73D4C884805CC7865E61142655F7B@GAALPA1MSGUSRBF.ITServices.sbc.com> <D3370313.258AE%goran.ap.eriksson@ericsson.com> <57114878.1030606@ecaspia.com> <43C1ECE7-139E-4FC8-A46D-83887261B7BC@gbiv.com>
From: Remy Lebeau <remy@lebeausoftware.org>
Organization: Lebeau Software
Message-ID: <57115777.4040001@lebeausoftware.org>
Date: Fri, 15 Apr 2016 14:04:55 -0700
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2
MIME-Version: 1.0
In-Reply-To: <43C1ECE7-139E-4FC8-A46D-83887261B7BC@gbiv.com>
Content-Type: multipart/alternative; boundary="------------000404070605040607060608"
Received-SPF: pass client-ip=173.201.193.238; envelope-from=remy@lebeausoftware.org; helo=p3plsmtpa09-09.prod.phx3.secureserver.net
X-W3C-Hub-Spam-Status: No, score=-3.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1arAvn-0001eH-2h bed98e1b544132b27390723c13b2e5f5
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Issue with "bytes" Range Unit and live streaming
Archived-At: <http://www.w3.org/mid/57115777.4040001@lebeausoftware.org>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31488
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

What you say is true, but you are only focusing on the *second half* of 
the Content-Range value, ignoring the *first half*.  Here is the full 
definition:

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

If the range is satisfied, the *complete-length* can be "*", but the 
*byte-range-resp* cannot be "*".

If the range is unsatisfied, the *byte-range-resp* must be "*", and the 
*complete-length* cannot be "*".

Remy Lebeau
Lebeau Software

On 4/15/2016 1:24 PM, Roy T. Fielding wrote:
> That is incorrect.  See RFC7233, Sec 4.2:
>
>     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.
>
>     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/*
>
> There is no need for another range unit.
>
> ....Roy
>