We are using the libcurl version 7.19.7 in genToo Linux. Sometimes while downloading file we are getting CURL_PARTIAL_FILE error and disappering after sometime. The libcurl error says there is size mismatch between what server told and actually transferred, in Write callback there is no mismatch in sizes where size * nmemb equals to bytes written (we had our debugging statements and couldn't see any mismatch). We are using ftps and in error buffer following text is returned "SSL read: error:02001002:system library:fopen:No such file or directory, errno 11". Could you please let me know what could be cause of the issue?
Thanks for your report. Unfortunately, 7.19.7 is simply a too old libcurl version for me to be able to care very much about it. I would be very interested if you can repeat your problem with a modern libcurl and OpenSSL setup.
So you're saying that you get the full file but still get that OpenSSL error text in the error buffer after the transfer and it returns CURLE_PARTIAL_FILE ?
Thanks for looking at. We have this software going to prodcution which can't be changed right now but we will put out best effort to change to recent versions on next releases.
This CURLE_PARTIAL_FILE error with OpenSSL error happens on the first OnWrite callback from cURL after successful file creation and bytes written specified OnWrite callback. I also wanted to reiterate that bytes returned on callback is same as bytes sent from cURL. That's why I was unclear on where the partial file happens.
Thanks in advance.
Last edit: Jaffer Ali 2013-03-06
Sorry if I condused in answering your question.
This error happens after completion of first write callback from libcurl. Yes we did recieve OpenSSL error in error buffer for CURLE_PARTIAL_FILE return error for curl_easy_perform() function.
Thanks in advance.
Still, unfortunately I can't do much about this unless you can show us how to repeat this problem with a recent libcurl/OpenSSL combo.
We updated libcurl version 7.29.0 and it fixed above problem. The above reported problem was occurred only in ADSL slow network and worked fine if we have hi-speed network.
Thanks for your help.