W3C home > Mailing lists > Public > public-media-fragment@w3.org > September 2009

Re: Multiple Range headers in an HTTP request

From: Philip Jägenstedt <philipj@opera.com>
Date: Thu, 10 Sep 2009 13:22:35 +0200
To: "Yves Lafon" <ylafon@w3.org>
Cc: Raphaël Troncy <Raphael.Troncy@cwi.nl>, "Media Fragment" <public-media-fragment@w3.org>
Message-ID: <op.uz1gjxhxatwj1d@sisko.linkoping.osa>
On Thu, 10 Sep 2009 11:41:14 +0200, Yves Lafon <ylafon@w3.org> wrote:

> On Thu, 10 Sep 2009, Philip Jägenstedt wrote:
>
>> On Thu, 10 Sep 2009 10:20:09 +0200, Raphaël Troncy  
>> <Raphael.Troncy@cwi.nl> wrote:
>>
>>> Dear all,
>>>  We knew that the latest blog post from Silvia is brilliant :-)
>>> http://blog.gingertech.net/2009/09/08/uri-fragments-vs-uri-queries-for-media-fragment-addressing/
>>>  It has triggered some interesting discussions too (read the  
>>> comments). One of them is the reason for my question. Philip  
>>> Jägenstedt wrote
>>> "I also would be surprised if there wasn?t a lot of server software  
>>> that assumes that there will be at most 1 Range HTTP header and  
>>> misbehaves otherwise."
>>>  A question for you Yves:
>>>   - is it allowed to have multiple Range headers in a single HTTP  
>>> request?
>>>   - how the server is supposed to interpret it if this is the case?
>>>     a) Ignore the Range request and serve the whole content
>>>     b) Pick the first Range and serves it
>>>     c) Pick a random Range among the ones specified and serves it
>>>     d) Undefined :-(
>>> Cheers.
>>>
>>>   Raphaël
>>>
>>
>> I don't know what the specs say, but I did a little experiment with nc  
>> (netcat):
>>
>> A:
>> Range: bytes=0-99
>>
>> B:
>> Range: bytes=0-99
>> Range: bytes=100-199
>>
>> C:
>> Range: bytes=0-99
>> Range: seconds=10-20
>>
>> D:
>> Range: seconds=10-20
>> Range: bytes=0-99
>>
>> Apache 2.2:
>> A: Content-Range: bytes 0-99
>> B: Content-Range: bytes 0-99 (multipart)
>> C: Content-Range: bytes 0-99 (multipart)
>> D: 200 OK (full resource)
>>
>> Conclusion: quite sane, but order matters and I don't know why I get a  
>> multipart response.
>
> C and D should have been either full resource or the single byte  
> fragment, but not multipart.
>
>> IIS 5.0:
>> A: Content-Range: bytes 0-99
>> B: 200 OK (full resource)
>> C: 200 OK (full resource)
>> D: 200 OK (full resource)
>>
>> Conclusion: completely broken with multiple Range headers.
> Well, no that's perfectly valid to answer with the full resource when  
> mutiple ranges are requested.

Again, I'm not making any claims about what various specs say, just noting  
that it's completely broken in the sense that using multiple range headers  
isn't going to do anything useful with one of the most common HTTP  
servers. In other words, it won't degrade gracefully.

-- 
Philip Jägenstedt
Core Developer
Opera Software
Received on Thursday, 10 September 2009 11:23:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 21 September 2011 12:13:34 GMT