views:

908

answers:

1

Hi

What is the difference between HTTP headers Content-Range and Range? When should each be used?

I am trying to stream an audio file from a particular byte offset. Should I use Content-Range or Range header?

Thanks

+9  A: 

Range is used in the request, to ask for a particular range (or ranges) of bytes. Content-Range is used in the response, to indicate which bytes the server is giving you (which may be different than the range you requested), as well as how long the entire content is (if known).

Brian Campbell