markevans/dragonfly — pull request #311 by idyll (2014-01-20 07:09:52+00:00)
Title: Support resuming downloads.

This should add the ability to resume the download of both a File and String I/O.

It is based on the HTTP_RANGE object. We use Racks build in range parsing to find the first range and deliver it.

Really, it's not a range - it's just an offset - because I am not stopping the I/O after we hit the end. Hopefully someone with a better understating of Rack can clean that part up.

That being said, it is totally usable - and very useful - right now.

I have tested it with a 5GB file and the md5 of the download matched the md5 of the original file after several restarts in my sample app.