mirror of
https://github.com/curl/curl.git
synced 2026-05-08 17:07:28 +03:00
STOR works!
This commit is contained in:
parent
56ac132401
commit
bdb411c6ca
1 changed files with 7 additions and 1 deletions
|
|
@ -184,18 +184,24 @@ sub STOR_command {
|
|||
|
||||
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") ||
|
||||
return 0; # failed to open output
|
||||
|
||||
my $line;
|
||||
my $ulsize=0;
|
||||
while (defined($line = <SOCK>)) {
|
||||
$ulsize += length($line);
|
||||
print FILE $line;
|
||||
}
|
||||
close(FILE);
|
||||
close(SOCK);
|
||||
|
||||
logmsg "received $ulsize bytes upload\n";
|
||||
|
||||
print "226 File transfer complete\r\n";
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue