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.94 by root, Sat Aug 13 23:42:05 2011 UTC vs.
Revision 1.95 by root, Wed Apr 24 23:49:34 2013 UTC

563 $self->err (416, "not satisfiable", $hdr, ""); 563 $self->err (416, "not satisfiable", $hdr, "");
564 564
565satisfiable: 565satisfiable:
566 # check for segmented downloads 566 # check for segmented downloads
567 if ($l && $::NO_SEGMENTED) { 567 if ($l && $::NO_SEGMENTED) {
568 my $timeout = $::NOW + 15; 568 my $timeout = $::NOW + 60;
569 while (keys %{$uri{$self->{remote_id}}{$self->{uri}}} > 1) { 569 while (keys %{$uri{$self->{remote_id}}{$self->{uri}}} > 1) {
570 if ($timeout <= $::NOW) { 570 if ($timeout <= $::NOW) {
571 $self->block ($::BLOCKTIME, "segmented downloads are forbidden");
572 #$self->err_segmented_download; 571 $self->err_segmented_download;
573 } else { 572 } else {
574 $httpevent->wait; 573 $httpevent->wait;
575 } 574 }
576 } 575 }
577 } 576 }
622 } 621 }
623 622
624 Coro::AIO::aio_read $fh, $l, ($h > $bufsize ? $bufsize : $h), my $buf, 0 623 Coro::AIO::aio_read $fh, $l, ($h > $bufsize ? $bufsize : $h), my $buf, 0
625 or last; 624 or last;
626 625
626 # readahead to work around rijk disk issues
627 IO::AIO::aio_readahead $fh, $l + $bufsize, $bufsize;
628
627 $tbf->request (length $buf); 629 $tbf->request (length $buf);
628 my $w = $self->{fh}->syswrite ($buf) 630 my $w = $self->{fh}->syswrite ($buf)
629 or last; 631 or last;
630 $::written += $w; 632 $::written += $w;
631 $self->{written} += $w; 633 $self->{written} += $w;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines