Reusing connection after failed FTP QUOTE command
Date: Tue, 08 Apr 2008 10:21:55 -0400
Dan, et. al.,
What are your thoughts on permitting a cURL connection to be reused after a
failed FTP QUOTE command?
I see (in the ftp_done function in ftp.c) that a connection is permitted to be
reused in the following cases:
I'd like to see the same behavior when the status is CURLE_QUOTE_ERROR in order
to avoid the need to establish a new connection and reauthenticate, etc..
The scenario I'm dealing with is the old FTP bugaboo, parsing results of the
LIST command in order to perform recursive operations (e.g., put or rmdir) or
provide parsed listing results back to client software. After getting the data
back and parsing it, it is sometimes desirable to perform other operations on
the results, such as MDTM or SIZE. When the target of such a quoted command is
a symbolic link, the command will fail if the link refers to a directory. The
failure is fine and useful information, but I'd like to be able to reuse the
connection for subsequent curl_easy_perform calls.
This is really only a performance issue (avoiding reconnection/reauthentication)
in my eyes, but if you don't think that this would be a really bad idea, I will
experiment and report back.
Received on 2008-04-08