Apache-ProxyRewrite
view release on metacpan or search on metacpan
ProxyRewrite.pm view on Meta::CPAN
my $base = $r->location();
my $args = $r->args();
if ($base ne '/') {
($my_uri = $r->uri) =~ s/^$base//;
} else {
$my_uri = $r->uri;
}
$my_uri = $remote_location . $my_uri;
$my_uri .= '?' . $r->args() if $args;
my $request = HTTP::Request->new($r->method, $my_uri);
$r->log->info("ProxyRewrite::fetch: Time proxy request method created: ", time);
$r->log->debug("fetch: Base URI (aka location section): $base");
$r->log->info("ProxyRewrite::fetch: Request for $my_uri with method ", $r->method);
my(%headers_in) = $r->headers_in;
while(($k,$v) = each %headers_in) {
# HACK to force no Keep-Alives on the connection between proxy
# and remote server
$r->log->debug("fetch: IN $k: $v");
( run in 0.395 second using v1.01-cache-2.11-cpan-de7293f3b23 )