cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-3048174 ] CURLOPT_RESUME_FROM does APPE instead of REST

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 18 Aug 2010 22:34:38 +0000

Bugs item #3048174, was opened at 2010-08-19 01:34
Message generated for change (Tracker Item Submitted) made by catalinr
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3048174&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: ftp
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: catalin (catalinr)
Assigned to: Daniel Stenberg (bagder)
Summary: CURLOPT_RESUME_FROM does APPE instead of REST

Initial Comment:
This happens (at least) when using FTP, upload, using c/c++ libcurl.
I don't have a way to reproduce this at hand, but if my eyes did not deceive me there were three APPE commands sent when using the mentioned curl option. (One is already the wrong way to go as REST is needed here, but why 3 of them?) They were intercepted by "SoftPerfect Network Protocol Analyzer".

I believe this was already mentioned here: http://curl.haxx.se/mail/lib-2008-08/0426.html , but I can't find it in the change.log, nor "known bugs", nor anywhere...

The workaround was to setup a regular upload and use something like
    curl_easy_setopt(curl, CURLOPT_PREQUOTE, opsBeforeUpload);
where curl_slist contained one option like "REST 12345" // 12345 was the file location where the resume should start from.
And BTW, I could not find anywhere in the docs what is expected for CURLOPT_INFILESIZE in case of CURLOPT_RESUME_FROM and CURLOPT_APPEND. If my "experiments" were correct, the argument for the former option is the remaining size to be uploaded, and not the whole file size as "[...]FILESIZE" seems to imply... But finding it out that way was quite frustrating...

IMHO the sources are in a great need of comments, especially for the internal functions. I did attempt to try to find and fix this but was quickly defeated by the impossibility of finding a starting point.

libcurl 7.21.1
msw Vista
mingw-gcc 3.4.5

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3048174&group_id=976
Received on 2010-08-19

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET