aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-02-26 16:57:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-02-26 16:57:00 +0000
commit9876ed09fedc103d8361f85fcad71ab675e9be3f (patch)
treef56b70e92bf83539881aa53c21c281e7b4e75837
parent17cbbe3dc5ad497bf596301fa946760e206e0ea3 (diff)
added support for RETRNOSIZE in the control file to tell RETR to not
include size in the 150-reply
-rw-r--r--tests/ftpserver.pl14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 37bd78307..0140f723f 100644
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -27,6 +27,7 @@ sub ftpmsg { print INPUT @_; }
my $verbose=0; # set to 1 for debugging
my $retrweirdo=0;
+my $retrnosize=0;
my $port = 8921; # just a default
do {
@@ -240,8 +241,13 @@ sub RETR_command {
$retrweirdo=0; # switch off the weirdo again!
}
else {
- print "150 Binary data connection for $testno () ($size bytes).\r\n";
- logmsg "150 Binary data connection for $testno ($size bytes).\n";
+ my $sz = "($size bytes)";
+ if($retrnosize) {
+ $sz = "size?";
+ }
+
+ print "150 Binary data connection for $testno () $sz.\r\n";
+ logmsg "150 Binary data connection for $testno () $sz.\n";
for(@data) {
my $send = $_;
@@ -386,6 +392,10 @@ sub customize {
print "instructed to use RETRWEIRDO\n";
$retrweirdo=1;
}
+ elsif($_ =~ /RETRNOSIZE/) {
+ print "instructed to use RETRNOSIZE\n";
+ $retrnosize=1;
+ }
}
close(CUSTOM);
}