curl-library
RE: FTP 3rd party transfers
Date: Sun, 16 Jan 2005 16:07:05 +0200
You can add to 'struct connectdata' new flag that will indicate 3
statuses: remote (regular transfer), source or target and will be
initialized as 'remote' and updated in Curl_perform() in transfer.c if
needed.
In Curl_debug() this flag will be passed as new parameter.
I applied your patch and it works well with standard servers (HP and
SUN). I ran 2 tests:
1. between 2 different remote servers (both support 3rd party file
transfer):
./curl -u user:pass --3rd-host sne465 --3rd-user user:pass --3r
d-path /tmp/File.dat ftp://hpd301//tmp/File.dat
2. on the same server:
./curl -u user:pass --3rd-host sne465 --3rd-user user:pass --3r
d-path /tmp/SourceFile.dat ftp://sne465//tmp/TargetFile.dat
And you are right about CURLOPT_SOURCE_QUOTE - this option was missed.
Alexander
-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Sunday, January 16, 2005 12:23
To: libcurl development
Subject: RE: FTP 3rd party transfers
On Sun, 16 Jan 2005, Alexander Krasnostavsky wrote:
Thanks for your fast response!
> 2. You are right about the case of both source and target is the same
> server. Therefore I recommend add indicators for source and target to
> distinguish between them.
Yes, that's what I'd like as well! I didn't figure out a quick and easy
way to make this though.
> To make 3rd party transfer work, FTP server must support this mode,
I don't think my problems to get it to work is related to the server,
since I got more basic errors.
If you apply the attached patch against a reasonably recent curl source
code, can you show me how you transfer a file (say "tmp/file-source") to
another location (say "tmp/file-dest") using the command line tool?
All new 3rd party options are named --3rd* something (for now).
> 3. I didn't find any example in RFC documents of using 3rd party
transfer in URL.
I don't think 3rd party transfers are addressed in the URL specs.
> Therefore it depends on you to decide how URL will be defined to have
both
> servers in it.
No, I meant that the source data could be in a separate URL exactly like
the
target data already is today: "ftp://source-server.com/file/path".
> Another way, I didn't think before, is to define SOURCE_URL
additionally to URL
Yes, that's the way I was trying to explain... :-)
--
Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
Dedicated custom curl help for hire: http://haxx.se/curl.html
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 2005-01-16