summaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-03-11 10:00:02 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-03-11 16:13:11 +0100
commit7b2f0676c2eaaa99e8773134414769fab02c2b2d (patch)
treeee25251fa5e58ba6f17b7192b87e45bbb876a61e /lib/ftp.c
parentdcccd8dd25a8e9d476f9bda94f9ebfd0b9f472db (diff)
downloadcurl-7b2f0676c2eaaa99e8773134414769fab02c2b2d.tar.gz
FTP: allow SIZE to fail when doing (resumed) upload
Added test 362 to verify. Reported-by: Jordan Brown Regression since 7ea2e1d0c5a7f (7.73.0) Fixes #6715 Closes #6725
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 56e7cf29e..8b347e34f 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -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) {