Check whether HTTP server supports "Range" request header

Hi,

I'm trying to develop a multi-threaded download manager which downloads several parts of the file concurrently using the "Range" HTTP request header field. However, I find that it is possible for servers to ignore that field.

As per HTTP specs, checking the "Accept-Ranges" field doesn't seem to be very reliable. How do I check whether the HTTP server of the URL supports range requests. This is essential for both multi-threaded downloads and pausing and resuming downloads.

[501 byte] By [chasana] at [2007-11-26 20:54:21]
# 1
I suspect that the only reliable way would be via testing. Second most reliable would be via documentation for the site (but a poor second to the first.)Then once you have the information put it in a configuration file so the app can use it.
jschella at 2007-7-10 2:21:12 > top of Java-index,Core,Core APIs...
# 2
Well thanx for that. I finally figured it out. I placed a dummy range request (bytes=0-) then checked the response code for 206.
chasana at 2007-7-10 2:21:12 > top of Java-index,Core,Core APIs...