Apache-Gateway
view release on metacpan or search on metacpan
1998-07-21 Charles C. Fu <perl@web-i18n.net>
* Gateway.pm:
Added a lot more documentation and used CPAN sites in the examples
instead of Debian sites.
Moved GatewayRoot out of main Apache conf files and into the
GatewayConfig files.
Added GatewayTimeout.
Adjusted If-Modified-Since time when talking to upstream servers with
incorrect timestamps.
Fixed errors in multiplexing.
Pass through cache and pragma directives.
Removed some debugging statements.
Apache config files (and vice versa)!
=over 4
=item GatewayRoot path
Sets the root of the gatewayed area on the local server. Generally
matches the C<Location> setting in the B<Apache> config files.
Defaults to "/".
=item GatewayTimeout timeout
Passes timeout (in seconds) to C<LWP::UserAgent>.
=item LocationMatch regexp
Begins a LocationMatch section. Works similarly to the ApacheLocation
match directive except that the pattern is a Perl regexp. Note: there
are no C<Location> or other style sections, only C<LocationMatch>.
LocationMatch sections are tried in order until a regexp is matched.
elsif(/^ClockBroken\s*(.*)/) {
# E.g., ClockBroken ftp://ftp.fuller.edu EST5EDT PST8PDT Yes
my($server, @arg) = split(' ', $1);
$arg[1] = 'GMT' unless defined $arg[1];
$clock_broken{$server} = [ @arg ];
}
elsif(/^GatewayRoot\s*(.*)/) {
$gw_root = $1;
}
elsif(/^GatewayTimeout\s*(.*)/) {
$timeout = $1;
}
else {
$r->log_error('Unrecognized command: ' . $_);
$r->status(HTTP::Status::RC_INTERNAL_SERVER_ERROR);
return;
}
}
# Store parsed results.
eg/gateway/CPAN view on Meta::CPAN
GatewayRoot /CPAN/
GatewayTimeout 90
# versioned files (presumably always up-to-date)
<LocationMatch "\d\.(readme|tar\.gz)$">
MuxSite ftp://ftp.cdrom.com/pub/perl/CPAN/
MuxSite ftp://ftp.digital.com/pub/plan/perl/CPAN/
Site ftp://ftp.orst.edu/pub/packages/CPAN/
Site ftp://ftp.perl.org/pub/perl/CPAN/
Site ftp://ftp.funet.fi/pub/languages/perl/CPAN/
</LocationMatch>
eg/gateway/debian view on Meta::CPAN
GatewayRoot /debian/
GatewayTimeout 90
# versioned files (presumably always up-to-date)
<LocationMatch "\.(deb|dsc|(diff|orig\.tar)\.gz)$">
Site ftp://ftp.fuller.edu/debian/
Site ftp://ftp.cdrom.com/pub/linux/debian/
Site ftp://ftp.debian.org/debian/
Site ftp://linux.eecs.umich.edu/pub/linux/debian/
</LocationMatch>
# unimportant, slowly changing files
eg/gateway/debian-non-US view on Meta::CPAN
GatewayRoot /debian/
GatewayTimeout 120
# versioned files (presumably always up-to-date)
<LocationMatch "\.(deb|dsc|(diff|orig\.tar)\.gz)$">
Site ftp://ftp.jimpick.com/pub/mirrors/debian-non-US/
Site ftp://non-us.debian.org/debian-non-US/
</LocationMatch>
# some directories
<LocationMatch "^dists$|/$">
Site ftp://non-us.debian.org/debian-non-US/
( run in 0.327 second using v1.01-cache-2.11-cpan-a5abf4f5562 )