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.57 by root, Mon Dec 3 05:40:09 2001 UTC vs.
Revision 1.58 by root, Mon Dec 3 21:32:35 2001 UTC

448 } 448 }
449 } 449 }
450 } elsif (-f _ && -r _) { 450 } elsif (-f _ && -r _) {
451 -x _ and $self->err(403, "forbidden"); 451 -x _ and $self->err(403, "forbidden");
452 452
453 if (%{$conn{$self->{remote_id}}} > $::MAX_TRANSFERS_IP) { 453 if (keys %{$conn{$self->{remote_id}}} > $::MAX_TRANSFERS_IP) {
454 my $timeout = $::NOW + 10; 454 my $timeout = $::NOW + 10;
455 while (%{$conn{$self->{remote_id}}} > $::MAX_TRANSFERS_IP) { 455 while (keys %{$conn{$self->{remote_id}}} > $::MAX_TRANSFERS_IP) {
456 if ($timeout < $::NOW) { 456 if ($timeout < $::NOW) {
457 $self->block($::BLOCKTIME, "too many connections"); 457 $self->block($::BLOCKTIME, "too many connections");
458 } else { 458 } else {
459 $httpevent->wait; 459 $httpevent->wait;
460 } 460 }
509 509
510satisfiable: 510satisfiable:
511 # check for segmented downloads 511 # check for segmented downloads
512 if ($l && $::NO_SEGMENTED) { 512 if ($l && $::NO_SEGMENTED) {
513 my $timeout = $::NOW + 15; 513 my $timeout = $::NOW + 15;
514 while (%{$uri{$self->{remote_id}}{$self->{uri}}} > 1) { 514 while (keys %{$uri{$self->{remote_id}}{$self->{uri}}} > 1) {
515 if ($timeout <= $::NOW) { 515 if ($timeout <= $::NOW) {
516 $self->block($::BLOCKTIME, "segmented downloads are forbidden"); 516 $self->block($::BLOCKTIME, "segmented downloads are forbidden");
517 #$self->err_segmented_download; 517 #$self->err_segmented_download;
518 } else { 518 } else {
519 $httpevent->wait; 519 $httpevent->wait;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines