aboutsummaryrefslogtreecommitdiff
path: root/tests/ftpserver.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-12-08 20:20:51 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-12-08 20:20:51 +0000
commit18371aaff999d4862a32d060f03d8f668e8fa1b1 (patch)
tree3f2ea6ffedbcb1f43e26f418078ad18ced2db6e0 /tests/ftpserver.pl
parentf36eab2608f473a7054f2c75c411abd676657a70 (diff)
- Fred Machado posted about a weird FTP problem on the curl-users list and when
researching it, it turned out he got a 550 response back from a SIZE command and then I fell over the text in RFC3659 that says: The presence of the 550 error response to a SIZE command MUST NOT be taken by the client as an indication that the file cannot be transferred in the current MODE and TYPE. In other words: the change I did on September 30th 2008 and that has been included in the last two releases were a regression and a bad idea. We MUST NOT take a 550 response from SIZE as a hint that the file doesn't exist.
Diffstat (limited to 'tests/ftpserver.pl')
-rw-r--r--tests/ftpserver.pl8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 7a2ffe529..f2acd72d8 100644
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -407,14 +407,12 @@ sub SIZE_command {
my $size = $data[0];
- 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) {
if($size > -1) {
sendcontrol "213 $size\r\n";
}
else {
- sendcontrol "350 $testno: SIZE is not supported.\r\n";
+ sendcontrol "550 $testno: No such file or directory.\r\n";
}
}
else {
@@ -427,7 +425,7 @@ sub SIZE_command {
sendcontrol "213 $size\r\n";
}
else {
- sendcontrol "350 $testno: SIZE is not supported.\r\n";
+ sendcontrol "550 $testno: No such file or directory.\r\n";
}
}
return 0;