curl-library
Re: partial file error
Date: Sun, 24 Feb 2002 17:25:53 +0100 (MET)
On Sun, 24 Feb 2002, Vishal_garg wrote:
> I am using curl-7-9-3.
> Libcurl returns 18 as error code if the remote file is being written at the
> time libcurl tries to retrieve the file.
libcurl will return error 18 if more or less data was transfered than was
originally told (by the server), yes.
> Is there any way in which I can retrieve the partial file, whatsoever its
> size is.
The error 18 (CURLE_PARTIAL_FILE) is returned after the transfer, but the
transfer was performed. You should've got parts of the file.
> Moreover in Windows it behaves differently as compare to in LINUX.In
> Windows if the speed of writing the remote file is slow then libcurl
> retrieves the file without error code 18,but in LINUX it returns error code
> 18 even if the remote file is being written at a slow speed.
I don't think this has anything to do with platform differences.
Feel free to provide examples showing this in greater detail if you think
differently.
> Does future or higher versions of libcurl can retrieve partial file? If
> yes, how?
It already retrieves the file, it just returns an error since it got a
different size than the server told it would send.
You could just make your program treat CURLE_PARTIAL_FILE as OK.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-02-24