Massyn has asked for the wisdom of the Perl Monks concerning the following question:
Hi fellow monks,
Just for fun, I'm busy building a new podcatcher in Perl. LWP is a cool module, but it doesn't support resume out of the box, and since downloads could potentially be broken, I'd like to make sure I can build a resume function into my code.
Resuming isn't something that comes natively to LWP. To do this, I would most likely have to read the headers, look for something like Ranges: to confirm the webserver does indeed support resuming, then ask the server to give me a part of the file, then check if the server will give me that part, or start the download fresh. (in some cases I wonder why I don't just do wget -c $url here)
So that's the thinking at least... Any other "perl's" of wisdom you could add to the mix? Hopefully there's another module that could take care of resume downloading?
Thanks as always for the kind assistance.
Cheers, and happy Australia day..
Massyn
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Resuming downloads with LWP?
by chromatic (Archbishop) on Jan 25, 2010 at 03:02 UTC | |
|
Re: Resuming downloads with LWP?
by zentara (Cardinal) on Jan 25, 2010 at 13:12 UTC |