ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/httpd.pl
(Generate patch)

Comparing Coro/myhttpd/httpd.pl (file contents):
Revision 1.30 by root, Sun Aug 26 14:55:46 2001 UTC vs.
Revision 1.31 by root, Mon Aug 27 05:05:26 2001 UTC

222 222
223 delete $blocked{$ip}; 223 delete $blocked{$ip};
224 } 224 }
225 225
226 if (%{$conn{$ip}} > $::MAX_CONN_IP) { 226 if (%{$conn{$ip}} > $::MAX_CONN_IP) {
227 my $delay = 120;
228 while (%{$conn{$ip}} > $::MAX_CONN_IP) {
229 if ($delay <= 0) {
227 $self->slog(2, "blocked ip $ip"); 230 $self->slog(2, "blocked ip $ip");
228 $self->err_blocked; 231 $self->err_blocked;
232 } else {
233 Coro::Event::do_timer(after => 3);
234 $delay -= 3;
235 }
236 }
229 } 237 }
230 238
231 $req =~ /^(?:\015\012)? 239 $req =~ /^(?:\015\012)?
232 (GET|HEAD) \040+ 240 (GET|HEAD) \040+
233 ([^\040]+) \040+ 241 ([^\040]+) \040+

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines