cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: FTP third party transfer (proxy) support.

From: Alexander Krasnostavsky <ALEXANDERKR_at_Amdocs.com>
Date: Wed, 19 May 2004 15:10:32 +0300

>> So, because there is no need for "classic" local client that actually
>> reads/writes to file at the local host "C", we need to specify in the
url
>> all the parameters for the target host "B" too.

>Right, so wouldn't then make sense to have a "target URL" and use the
>original one as source URL?

I checked in RFC documents and forums that describe url and found that
there is no definition for the target. So there is no need to change the
source url. For the target I think to add to structures the following
definitions:
struct connectdata {
        ...
        struct hostname ftp_target;/* ftp target host */
        bool is_ftp_3rd_party_mode;/* indicates ftp 3rd party transfer
mode */
        char *ftp_target_user; /* ftp target user */
        char *ftp_target_passwd; /* ftp target password */
        char *ftp_target_path /* ftp target full file name */
}

struct UserDefined {
        ...
        char *ftp_target_host;
        char *ftp_target_port;
        char *ftp_target_userpwd;
        char *ftp_target_path;

        bool is_ftp_target_host;
        bool is_ftp_target_port;
        bool is_ftp_target_userpwd;
}

and the following options for curl_easy_setopt():
CURLOPT_FTP_TARGET_HOST
CURLOPT_FTP_TARGET_PORT
CURLOPT_FTP_TARGET_USERPWD
CURLOPT_FTP_TARGET_PATH

>> "3rd party transfers" and ftp-proxying are the same concept.

>Ok, but let's call this "3rd party transfers" then, as "proxy" is often
>used to refer to other functionality.

I agree.

>> Proxy is the "FTP" server mode. I prefer to call source and target
>> hosts.
>> But it is required to change the options from CURLOPT_PREQUOTE and
>> CURLOPT_POSTQUOTE to CURLOPT_SOURCEPREQUOTE, CURLOPT_SOURCEPOSTQUOTE
and
>> CURLOPT_TARGETPREQUOTE, CURLOPT_TARGETPOSTQUOTE

>No, I'd rather keep the "source" ones the main ones and we can leave
them >as is, as I believe most FTP transfers will continue to not be 3rd
party >and thus will only involve one ftp server. The "target"-versions
make sense >to me now.

I agree. So I will add only:
CURLOPT_TARGETPREQUOTE
CURLOPT_TARGETPOSTQUOTE

>> About CURLOPT_FTPPROXYLISTONLY - because in proxy mode we have 2
>>connections with 2 remote hosts, we can actually perform the LIST
command >> on both. It is just for the uniform interface.

>Ah, right. Not that I think it makes much sense to issue LIST on two
servers "at once".

I just thought about it once again, and decide that actually there is no
need to execute just a LIST in 3rd party transfer. It can be done
separately in the usual mode on both hosts.

>I think that the biggest changes needed in libcurl will be to handle
two >copies of lots of data that only exists in one single instance
today (user >name, password, bla bla).

You are right.

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-05-19