Apache-Gateway
view release on metacpan or search on metacpan
use strict;
use vars qw(@ISA);
use Exporter ();
@ISA = qw(Exporter);
$Apache::Gateway::VERSION = sprintf("%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/g);
use Apache::Constants ':server'; # for SERVER_VERSION for Via comment
use Apache::URI ();
use HTTP::Date ();
use HTTP::Request ();
use HTTP::Status ();
use IO::File ();
use LWP::UserAgent ();
use Time::Zone ();
# In an Apache::Registry script, we would need to make the following
# variables global. However, making them global seems unnecesary in a
# handler.
my %default_port = (finger => 79,
ftp => 21,
my $path = $self->{GW_PATH};
my $url = Apache::URI->parse($r, $site . $path);
# If this is an anon-FTP request, fill in the password with the
# UA's from field.
if($url->scheme eq 'ftp' && $url->user eq 'anonymous') {
$url->password($ua->from) # anon-FTP passwd
}
my $request = HTTP::Request->new($r->method, $url->unparse);
# If upstream server has a broken clock, calculate how much we
# need to adjust condition GET time fields. Note: this code won't
# work correctly if we get redirected to another server with a
# different clock. Oh, well.
my $loc_conf = $self->location_config;
my $upstream_server = server_name_from_URL($r, $url);
my $broken_clock = 0;
if(exists $loc_conf->{BROKEN_CLOCK}{$upstream_server}) {
my $TZ = $loc_conf->{BROKEN_CLOCK}{$upstream_server};
REQUIREMENTS
In order to install and use this package you will need Perl
version 5.004 or better, an Apache server with modperl, and the
appropriate administrative privileges to run Apache/Perl modules.
Apache::Gateway uses many other modules.
* Apache::Constants
* HTTP::Date
* HTTP::Request
* HTTP::Status
* IO::File
* LWP::UserAgent
* Regexp
* Time::Zone
* URI::URL
These packages should be available on CPAN.
INSTALLATION
( run in 1.063 second using v1.01-cache-2.11-cpan-de7293f3b23 )