diff options
author | Michael Heimpold <mhei@heimpold.de> | 2022-08-24 18:58:02 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-09-07 10:26:55 +0200 |
commit | d6686856577c373e06adeb8eb4e34e2e046e194d (patch) | |
tree | 33326debee3f040fcb425988f1b93eeb99e96e8c /lib/ftp.c | |
parent | f703cf971ccdb93fea05f223cabbb99ca06cdc75 (diff) | |
download | curl-d6686856577c373e06adeb8eb4e34e2e046e194d.tar.gz |
ftp: ignore a 550 response to MDTM
The 550 is overused as a return code for multiple error case, e.g.
file not found and/or insufficient permissions to access the file.
So we cannot fail hard in this case.
Adjust test 511 since we now fail later.
Add new test 3027 which check that when MDTM failed, but the file could
actually be retrieved, that in this case no filetime is provided.
Reported-by: Michael Heimpold
Fixes #9357
Closes #9387
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2131,9 +2131,11 @@ static CURLcode ftp_state_mdtm_resp(struct Curl_easy *data, default: infof(data, "unsupported MDTM reply format"); break; - case 550: /* "No such file or directory" */ - failf(data, "Given file does not exist"); - result = CURLE_REMOTE_FILE_NOT_FOUND; + case 550: /* 550 is used for several different problems, e.g. + "No such file or directory" or "Permission denied". + It does not mean that the file does not exist at all. */ + infof(data, "MDTM failed: file does not exist or permission problem," + " continuing"); break; } |