STOR works!
This commit is contained in:
@@ -184,18 +184,24 @@ sub STOR_command {
|
|||||||
|
|
||||||
logmsg "STOR test number $testno\n";
|
logmsg "STOR test number $testno\n";
|
||||||
|
|
||||||
my $filename = "log/ftp.upload";
|
my $filename = "log/ftpout.$testno";
|
||||||
|
|
||||||
|
print "200 Gimme gimme gimme!\r\n";
|
||||||
|
|
||||||
open(FILE, ">$filename") ||
|
open(FILE, ">$filename") ||
|
||||||
return 0; # failed to open output
|
return 0; # failed to open output
|
||||||
|
|
||||||
my $line;
|
my $line;
|
||||||
|
my $ulsize=0;
|
||||||
while (defined($line = <SOCK>)) {
|
while (defined($line = <SOCK>)) {
|
||||||
|
$ulsize += length($line);
|
||||||
print FILE $line;
|
print FILE $line;
|
||||||
}
|
}
|
||||||
close(FILE);
|
close(FILE);
|
||||||
close(SOCK);
|
close(SOCK);
|
||||||
|
|
||||||
|
logmsg "received $ulsize bytes upload\n";
|
||||||
|
|
||||||
print "226 File transfer complete\r\n";
|
print "226 File transfer complete\r\n";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user