mirror of
https://github.com/curl/curl.git
synced 2026-08-26 12:13:32 +03:00
make the ftp server support reply/servercmd, and make SLOWDOWN work, and
update the docs accordingly
This commit is contained in:
parent
e9d068b913
commit
cd1144dc24
3 changed files with 19 additions and 10 deletions
|
|
@ -118,7 +118,7 @@ sub sendcontrol {
|
|||
|
||||
for(@a) {
|
||||
print $_;
|
||||
select(undef, undef, undef, 0.1);
|
||||
select(undef, undef, undef, 0.02);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -544,6 +544,7 @@ sub customize {
|
|||
undef %customreply;
|
||||
|
||||
$nosave = 0; # default is to save as normal
|
||||
$controldelay = 0; # default is no delaying the responses
|
||||
|
||||
open(CUSTOM, "<log/ftpserver.cmd") ||
|
||||
return 1;
|
||||
|
|
@ -565,6 +566,10 @@ sub customize {
|
|||
$delayreply{$1}=$2;
|
||||
logmsg "FTPD: delay reply for $1 with $2 seconds\n";
|
||||
}
|
||||
elsif($_ =~ /SLOWDOWN/) {
|
||||
$controldelay=1;
|
||||
logmsg "FTPD: send response with 0.1 sec delay between each byte\n";
|
||||
}
|
||||
elsif($_ =~ /RETRWEIRDO/) {
|
||||
logmsg "FTPD: instructed to use RETRWEIRDO\n";
|
||||
$retrweirdo=1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue