Re: http resume
Daniel Stenberg <daniel-curl <at> haxx.se>
2004-03-01 10:13:29 GMT
On Wed, 25 Feb 2004, Eduardo =?iso-8859-1?Q?García?= wrote:
> I have extracted calls to libcurl from my code and I am attaching a
> little test source reproducing 'the bug'. The test sample begins to download
> a file: http://www.bitcomet.com/achive/BitComet_0.44.exe and aborts the
> download after at least 4000 bytes. If you run it again it checks the
> partially downloaded size and resumes the download after it has got 8000
> bytes at least, and then aborts it again. The sample dumps libcurl verbose
> info for both attemps, so you can check headers and bytes downloaded.
Can you please provide such headers here in a mail instead? Your source code
was severly windowsified and I would rather not sit and adjust it to build on
my systems when you already have the info I could use to understand your
> The result is 'the bug' again: headers messages (in dumps) shows
> correctly resumed download commands, but resumed bytes are always from the
> beginning of the file, an not from resume point as headers show.
Can you show us?
> But I have got another strange behaviour while running it one and
> another in order to be sure of it as a good sample for you: Once I have
> completely downloaded the file on other disk-file ("Save as" in a
> web-explorer) in order to compare the downloads, the second run of the
> sample (resume) doesn't work, it cannot download even a byte and libcurl
> (curl_easy_perform) returns CURLE_HTTP_RANGE_ERROR.
Trying to resume a download of an already downloaded used to cause that bug,
because you can't request a range for a file that is beyond the file's size.