curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

About FTP Upload and REST (restart marker)

From: 大野恵正 via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 9 Jul 2024 08:49:48 +0900

Hello everyone.

Please tell me about FTP upload resume.

I am developing an application that uses linked libcurl to create FTP
client functionality.

I am trying to have a Upload resume function and I am incorporating it
using the logic from docs\examples\ftpuploadresume.c as a reference.
If you resume while communicating with an IIS FTP server (Windows 10), the
behavior is that only the resumed part of the file is saved on the server.
In the case of FileZilla Server, the file is simply appended.

I am having trouble determining if this is some kind of bug or a protocol
problem.

I checked VERBOSE when it works, and it seems that the Upload resume logic
is sending "REST 0" to the server when getting the size.
According to RFC 3659 about REST (restart marker), it is up to the server
to apply REST to APPE, and if REST is applied, APPE will behave the same as
STOR.

If that is the case, shouldn't REST not be sent when getting the size, or
should REST be initialized when APPEND is done (to the position for APPEND
determined by SIZE)?

In the application I am developing, I turn on the CURLOPT_FORBID_REUSE
option when acquiring the size, so that the session is disconnected and the
REST is not affected.

If this is a necessary step, I would like to see it reflected in the
examples.
Or should we review the conditions for sending REST as an implementation on
the Curl side?

Does anyone know anything about this?
Any feedback would be appreciated.

- Yoshimasa


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-07-09