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.23 by root, Sat Aug 18 02:58:38 2001 UTC vs.
Revision 1.24 by root, Sat Aug 18 13:32:17 2001 UTC

271 271
272 $self->{server_port} = $self->{h}{host} =~ s/:([0-9]+)$// ? $1 : 80; 272 $self->{server_port} = $self->{h}{host} =~ s/:([0-9]+)$// ? $1 : 80;
273 273
274 weaken ($uri{$self->{remote_addr}}{$self->{uri}}{$self*1} = $self); 274 weaken ($uri{$self->{remote_addr}}{$self->{uri}}{$self*1} = $self);
275 275
276 eval {
276 $self->map_uri; 277 $self->map_uri;
277 $self->respond; 278 $self->respond;
279 };
280
281 die if $@ && !ref $@;
278 282
279 $self->eoconn; 283 $self->eoconn;
280 284
281 last if $self->{h}{connection} =~ /close/ || $self->{version} lt "1.1"; 285 last if $self->{h}{connection} =~ /close/ || $self->{version} lt "1.1";
282 286
429 goto ignore; 433 goto ignore;
430 } 434 }
431 goto satisfiable if $l >= 0 && $l < $length && $h >= 0 && $h > $l; 435 goto satisfiable if $l >= 0 && $l < $length && $h >= 0 && $h > $l;
432 } 436 }
433 $hdr->{"Content-Range"} = "bytes */$length"; 437 $hdr->{"Content-Range"} = "bytes */$length";
438 $hdr->{"Content-Length"} = $length;
434 $self->slog(9, "not satisfiable($self->{h}{range}|".$self->{h}{"user-agent"}.")"); 439 $self->slog(9, "not satisfiable($self->{h}{range}|".$self->{h}{"user-agent"}.")");
435 $self->err(416, "not satisfiable", $hdr); 440 $self->err(416, "not satisfiable", $hdr, "");
436 441
437satisfiable: 442satisfiable:
438 # check for segmented downloads 443 # check for segmented downloads
439 if ($l && $::NO_SEGMENTED) { 444 if ($l && $::NO_SEGMENTED) {
440 if (%{$uri{$self->{remote_addr}}{$self->{uri}}} > 1) { 445 if (%{$uri{$self->{remote_addr}}{$self->{uri}}} > 1) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines