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

Comparing cvsroot/Coro/myhttpd/httpd.pl (file contents):
Revision 1.4 by root, Fri Aug 10 04:16:41 2001 UTC vs.
Revision 1.5 by root, Fri Aug 10 15:58:04 2001 UTC

221 $self->{server_port} = $self->{h}{host} =~ s/:([0-9]+)$// ? $1 : 80; 221 $self->{server_port} = $self->{h}{host} =~ s/:([0-9]+)$// ? $1 : 80;
222 222
223 weaken ($uri{$self->{uri}}{$self*1} = $self); 223 weaken ($uri{$self->{uri}}{$self*1} = $self);
224 224
225 $self->map_uri; 225 $self->map_uri;
226
227 Coro::Event::do_timer(after => 5);
228
229 $self->respond; 226 $self->respond;
230 #} 227 #}
231} 228}
232 229
233# uri => path mapping 230# uri => path mapping
406 } 403 }
407 404
408 $h -= $l - 1; 405 $h -= $l - 1;
409 406
410 while ($h > 0) { 407 while ($h > 0) {
411 $h -= sysread $fh, $buf, $h > 16384 ? 16384 : $h; 408 $h -= sysread $fh, $buf, $h > $::BUFSIZE ? $::BUFSIZE : $h;
412 print {$self->{fh}} $buf 409 $self->{fh}->syswrite($buf)
413 or last; 410 or last;
414 cede;
415 } 411 }
416 } 412 }
417 413
418 close $fh; 414 close $fh;
419} 415}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines