Apache-Roaming
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
. " Missing ServerRoot" unless $server_root;
$_ = "LoadModule $module $server_root/$path\n";
}
}
$_;
} @module_list;
$cfg->{'dynamic_module_list'} = join("", @module_list);
$cfg->{'httpd_user'} = prompt("HTTPD's UID for running tests: ",
$cfg->{'httpd_user'} || ('#' . $>));
my $gid = $);
$gid =~ s/\s.*//;
$cfg->{'httpd_group'} = prompt("HTTPD's GID for running tests: ",
$cfg->{'httpd_group'} || ('#' . $gid));
$cfg->{'httpd_port'} = prompt("Port to use for running tests: ",
$cfg->{'httpd_port'} || 8259);
my $tdir = $cfg->{'t_dir'} = File::Spec->catdir(Cwd::getcwd(), "t");
$cfg->{'httpd_conf'} = File::Spec->catfile($tdir, "httpd.cnf");
$cfg->{'access_conf'} = File::Spec->catfile($tdir, "access.cnf");
$cfg->{'srm_conf'} = File::Spec->catfile($tdir, "srm.cnf");
$cfg->{'types_conf'} = File::Spec->catfile($tdir, "mime.types");
$cfg->{'user_file'} = File::Spec->catfile($tdir, "htusers");
my $log_dir = File::Spec->catdir($tdir, "logs");
lib/Apache/Roaming.pm view on Meta::CPAN
sub GET {
my $self = shift;
my $file = $self->{'file'};
my $r = $self->{'request'};
if (! -f $file) {
$self->{'status'} = Apache::Constants::NOT_FOUND();
die "No such file: $file";
}
# return Apache::DECLINED();
my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime) = stat _;
my $fh = Symbol::gensym();
if (!open($fh, "<$file") || !binmode($fh)) {
die "Failed to open file $file: $!";
}
$r->set_last_modified($mtime);
$r->content_type('text/plain');
$r->no_cache(1);
$r->header_out('content_length', $size);
$r->send_http_header();
if (!$r->header_only()) {
( run in 1.315 second using v1.01-cache-2.11-cpan-5735350b133 )