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.54 by root, Fri Nov 30 06:03:48 2001 UTC vs.
Revision 1.55 by root, Fri Nov 30 06:20:43 2001 UTC

447 $ims < $self->{stat}[9] 447 $ims < $self->{stat}[9]
448 or $self->err(304, "not modified"); 448 or $self->err(304, "not modified");
449 449
450 if (-r "$path/index.html") { 450 if (-r "$path/index.html") {
451 # replace directory "size" by index.html filesize 451 # replace directory "size" by index.html filesize
452 $self->{stat}[7] = (stat ($self->{path} .= "/index.html"))[7]; 452 $self->{stat} = [stat ($self->{path} .= "/index.html")];
453 $self->handle_file($queue_index); 453 $self->handle_file($queue_index);
454 } else { 454 } else {
455 $self->handle_dir; 455 $self->handle_dir;
456 } 456 }
457 } 457 }
470 470
471 $self->response(200, "ok", 471 $self->response(200, "ok",
472 { 472 {
473 "Content-Type" => "text/html", 473 "Content-Type" => "text/html",
474 "Content-Length" => length $idx, 474 "Content-Length" => length $idx,
475 "Last-Modified" => time2str ((stat _)[9]), 475 "Last-Modified" => time2str ($self->{stat}[9]),
476 }, 476 },
477 $idx); 477 $idx);
478} 478}
479 479
480sub handle_file { 480sub handle_file {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines