diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-03-11 10:00:02 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-03-11 10:02:15 +0100 |
commit | 915438460abe53e5d3dcb1b2a6fd47f56c7151bb (patch) | |
tree | 926ef59c89d0acbde0b93851bbcb8a5d5c8542e7 /lib/ftp.c | |
parent | 6043dfa4f9471cf4f5da2492670aff26b16a94ab (diff) | |
download | curl-915438460abe53e5d3dcb1b2a6fd47f56c7151bb.tar.gz |
FTP: allow SIZE to fail when doing (resumed) uploadbagder/ftp-resume-upload
Added test 362 to verify.
Reported-by: Jordan Brown
Fixes #6715
Regression since 7ea2e1d0c5a7f (7.73.0)
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2309,8 +2309,12 @@ static CURLcode ftp_state_size_resp(struct Curl_easy *data, } else if(ftpcode == 550) { /* "No such file or directory" */ - failf(data, "The file does not exist"); - return CURLE_REMOTE_FILE_NOT_FOUND; + /* allow a SIZE failure for (resumed) uploads, when probing what command + to use */ + if(instate != FTP_STOR_SIZE) { + failf(data, "The file does not exist"); + return CURLE_REMOTE_FILE_NOT_FOUND; + } } if(instate == FTP_SIZE) { |