cURL / Mailing Lists / curl-library / Single Mail


RE: FTP third party transfer (proxy) support.

From: Alexander Krasnostavsky <>
Date: Tue, 1 Jun 2004 16:27:37 +0300

> I don't understand this completely. Do you mean that when you RETR a
> file and then the sending end doesn't send anything, you get an empty
> file produced?

Yes. The commands sequence when a source host is passive is as the
/* transfers file between remote hosts */
FTPSENDF(sec_conn, "RETR %s", data->set.source_path);

if (data->set.ftp_append) {
  /* we append onto the file instead of rewriting it */
  FTPSENDF(conn, "APPE %s", conn->path);
} else {
  FTPSENDF(conn, "STOR %s", conn->path);
result = Curl_GetFTPResponse(&nread, sec_conn, &ftpcode);
if (result) return result;
if (ftpcode != 150) return CURLE_FTP_COULDNT_RETR_FILE;

result = Curl_GetFTPResponse(&nread, conn, &ftpcode);
if (result) return result;
if (ftpcode != 150) return CURLE_FTP_COULDNT_STOR_FILE;

There is no response after the RETR command. Therefore STOR/APPE should
be sent. In this step an empty target file was created. Now we have the
response from both commands, and particularly from RETR we might have
"550 : No such file or directory." error.

The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated recipient(s)
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.
Thank you.
Received on 2004-06-01