Skip navigation
This discussion is archived

Resumable download support for "Safari for Windows" - (content-range)

2499 Views 2 Replies Latest reply: Mar 2, 2009 8:10 AM by deepflux RSS
deepflux Calculating status...
Currently Being Moderated
Feb 10, 2009 7:55 AM
I'm a web developer and a the moment am upgrading our company website to support "resumable" downloads, i.e. when you want to download a file you can use the useful "pause/resume" function to pause your download and resume it later. It will be very beneficial because sometimes our users can be downloading massive files.

If you are not familiar with this, the HTTP 1.1 standard (rfc2616) defines headers that a download agent (browser-Safari in this case) may use to retrieve a sub-range of the full requested URI, i.e. useful to resume the retrieval of a large download that has been interrupted in-transit. This is done by advertising that the web server supports this on the initial call using the header "Accept-Ranges: bytes" along with the normal headers, and then when pause/resume is hit, it sends a second request for the remaining bytes using a "Range" or "Content-Range" header.

This segment of the download file stream is then sent back to the download agent along with headers:
HTTP/1.1 206 Partial Content
Content-Range: bytes [start]-[end]/[full size]
Content-Length: {[end] - [start] + 1}
Last-Modified: [date]
ETag: [unique string]
Accept-Ranges: bytes

Now for the problem. This all works well with Firefox (another browser that also supports range requests), download managers and "Safari for Mac", however, this does not work in "Safari for Windows". It certainly suggests it should work as Safari4W has the pause/resume buttons on its download window, but looking at the server logs, Safari is the only download agent which doesn't request the remaining content range when "resume" is pressed. It works on everything else now, so I have to presume this is a "Safari for Windows" bug.

To put this in simpler language, there is a bug with "Safari for Windows" in that it doesn't send the request to the server (with the content-range header in the request) to ask to finish the download when you press "Resume".

I've tried all sorts of combinations of setting extra headers for privacy/caching/etc which make no difference. Another point of note, it only works on the other download agents when the call is set as a "get" on the download web page rather than a "post". It doesn't work in any scenario for Safari4W.

I was wondering if anyone else has seen this behaviour or have a workaround to the issue. Also I cannot find anyway of reporting this bug to the developers of Safari, so hope that some of them check out this forum and will come across this post and will fix it in there next release.

I realise this post will confuse all but the most experienced developers, but if you've red this far, perhaps you are someone who can help!

Thanks!
Windows XP Pro

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.