- The libcurl FTP code now returns CURLE_REMOTE_FILE_NOT_FOUND error when SIZE

gets a 550 response back for the cases where a download (or NOBODY) is
  wanted. It still allows a 550 as response if the SIZE is used as part of an
  upload process (like if resuming an upload is requested and the file isn't
  there before the upload). I also modified the FTP test server and a few test
  cases accordingly to match this modified behavior.
This commit is contained in:
Daniel Stenberg 2008-09-30 09:51:58 +00:00
parent beb14ca6d6
commit 038542ea3e
8 changed files with 22 additions and 9 deletions

View file

@ -389,12 +389,14 @@ sub SIZE_command {
my $size = $data[0];
if($size) {
if($size ne "") {
# we check for "" to be able to explictly set the size to 0 and yet have
# that send a 213
if($size > -1) {
sendcontrol "213 $size\r\n";
}
else {
sendcontrol "550 $testno: No such file or directory.\r\n";
sendcontrol "350 $testno: SIZE is not supported.\r\n";
}
}
else {
@ -407,7 +409,7 @@ sub SIZE_command {
sendcontrol "213 $size\r\n";
}
else {
sendcontrol "550 $testno: No such file or directory.\r\n";
sendcontrol "350 $testno: SIZE is not supported.\r\n";
}
}
return 0;