Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Podcasting with iTunes requires byte-range request support. I'm assisting someone who is having trouble getting their podcast accepted by Apple for inclusion in their iTunes store, and it was suggested that their web server is not currently supporting byte-range requests.

My question is: Is there a way I can test whether or not the web server is handling byte-range requests correctly? I don't have any access to the web server other than the normal public requests. If I have the URL to an MP3 file on the web server, can I use a web browser or other tool to test this, perhaps looking at HTTP headers?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

This command assumes Linux - but would probably work on windows or mac with minor alteration - curl is widely available, but may not be installed on your system of choice by default. The example file I am getting is the curl manual - a handy URL ;)

curl --silent --range 20-40 http://curl.haxx.se/docs/manpage.html | wc -c

This returns "21" - I have asked for bytes 20-40, and then curl outputs to stdout, which I pipe to wc to count the characters.

If you get an answer that's much bigger, the server has sent the whole file (try "www.youtube.com" - that serves the entire index regardless of what range you ask).

So you're looking for the magic 21 here to say "byte range isn't the problem".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.