cURL / Mailing Lists / curl-library / Single Mail

curl-library

Corrupted file after FTP download resume

From: Marcin Adamski <mass85_at_tlen.pl>
Date: Wed, 21 Mar 2012 12:28:46 +0100

Hi

I'm having problems with FTP download resume while using libcurl - downloaded file is of the same size as original one, but the content is different starting from some random byte after last transmitted byte before resuming (this offset can be as large as 1MB or more. I don't see any correlation here).

I extracted code from my application and simplified it. The result is attached to this email. I use this small application to download 5MB file from Pure-FTPd server via VPN (Openvpn) over GPRS connection (pppd). To reproduce the problem I just need to kill pppd once during transfer, wait until connection is reestablished and file downloaded. If the file for download is too short i.e. 500KB, problem does not occur.

This small application is run on ARM (Linux system) and using libcurl 7.24.

Can you see any obvious mistake in my code?

Regards
Marcin Adamski

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

  • application/octet-stream attachment: test.cpp
Received on 2012-03-21