diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-09-25 17:13:42 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-09-26 13:37:15 +0200 |
commit | 4a4c7245998af59dbc16f267fd5f000f2950ba4f (patch) | |
tree | 6ee4a2ba98d64290decb0e84aa590ca9616d570c /lib/ftp.c | |
parent | 7772344e17939e86879b57b4833d56b8beadd927 (diff) | |
download | curl-4a4c7245998af59dbc16f267fd5f000f2950ba4f.tar.gz |
ftp: make a 552 response return CURLE_REMOTE_DISK_FULL
Added test 348 to verify. Added a 'STOR' command to the test FTP
server to enable test 348. Documented the command in FILEFORMAT.md
Reported-by: Duncan Wilcox
Fixes #6016
Closes #6017
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -3292,9 +3292,18 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status, if(!ftpc->dont_check) { /* 226 Transfer complete, 250 Requested file action okay, completed. */ - if((ftpcode != 226) && (ftpcode != 250)) { + switch(ftpcode) { + case 226: + case 250: + break; + case 552: + failf(data, "Exceeded storage allocation"); + result = CURLE_REMOTE_DISK_FULL; + break; + default: failf(data, "server did not report OK, got %d", ftpcode); result = CURLE_PARTIAL_FILE; + break; } } } |