mirror of
https://github.com/curl/curl.git
synced 2026-07-25 13:47:23 +03:00
- CURLOPT_FTP_CREATE_MISSING_DIRS can now be set to 2 in addition to 1 for
plain FTP connections, and it will then allow MKD to fail once and retry the CWD afterwards. This is especially useful if you're doing many simultanoes connections against the same server and they all have this option enabled, as then CWD may first fail but then another connection does MKD before this connection and thus MKD fails but trying CWD works! The numbers can (should?) now be set with the convenience enums now called CURLFTP_CREATE_DIR and CURLFTP_CREATE_DIR_RETRY. Tests has proven that if you're making an application that uploads a set of files to an ftp server, you will get a noticable gain in speed if you're using multiple connections and this option will be then be very useful.
This commit is contained in:
parent
1472be4d3e
commit
8f81fd6be5
8 changed files with 63 additions and 19 deletions
|
|
@ -530,6 +530,17 @@ typedef enum {
|
|||
CURLFTPAUTH_LAST /* not an option, never use */
|
||||
} curl_ftpauth;
|
||||
|
||||
/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */
|
||||
typedef enum {
|
||||
CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */
|
||||
CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD
|
||||
again if MKD succeeded, for SFTP this does
|
||||
similar magic */
|
||||
CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD
|
||||
again even if MKD failed! */
|
||||
CURLFTP_CREATE_DIR_LAST /* not an option, never use */
|
||||
} curl_ftpcreatedir;
|
||||
|
||||
/* parameter for the CURLOPT_FTP_FILEMETHOD option */
|
||||
typedef enum {
|
||||
CURLFTPMETHOD_DEFAULT, /* let libcurl pick */
|
||||
|
|
@ -936,7 +947,10 @@ typedef enum {
|
|||
argument */
|
||||
CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),
|
||||
|
||||
/* FTP Option that causes missing dirs to be created on the remote server */
|
||||
/* FTP Option that causes missing dirs to be created on the remote server.
|
||||
In 7.19.4 we introduced the convenience enums for this option using the
|
||||
CURLFTP_CREATE_DIR prefix.
|
||||
*/
|
||||
CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),
|
||||
|
||||
/* Set this to a bitmask value to enable the particular authentications
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue