Re: Multiple Range headers in an HTTP request

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.

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.

I wasn't very rigorous about this so there may be errors. I couldn't find  
a public Apache 1.3 to test.

-- 
Philip Jägenstedt
Core Developer
Opera Software

Received on Thursday, 10 September 2009 09:13:04 UTC