Apache2-CondProxy
view release on metacpan or search on metacpan
lib/Apache2/CondProxy.pm view on Meta::CPAN
$r->err_headers_out->overlap
($subr->err_headers_out, APR::Const::OVERLAP_TABLES_SET);
# apparently content_type has to be done separately
#$r->log->debug($subr->content_type);
$r->content_type($subr->content_type) if $subr->content_type;
$r->content_encoding($subr->content_encoding)
if $subr->content_encoding;
$r->set_last_modified($subr->mtime) if $subr->mtime;
$r->SUPER::handler('modperl');
$r->set_handlers(PerlResponseHandler => \&_response_handler);
$r->push_handlers(PerlCleanupHandler => \&_cleanup_handler);
$r->add_output_filter(\&_output_filter_release);
return Apache2::Const::OK;
}
}
}
Apache2::Const::OK;
lib/Apache2/CondProxy.pm view on Meta::CPAN
}
# just do this.
$base = URI->new_abs(substr($r->unparsed_uri, 1), $base);
# for some reason mod_proxy mysteriously started double-escaping
# URIs. AHA: MAGIC.
$r->notes->set('proxy-nocanon', 1);
$r->filename(sprintf 'proxy:%s', $base);
$r->proxyreq(Apache2::Const::PROXYREQ_REVERSE);
$r->SUPER::handler('proxy-server');
$r->add_output_filter(\&_output_filter_fix_location);
if ($first) {
$r->push_handlers(PerlCleanupHandler => \&_cleanup_handler);
$r->add_input_filter(\&_input_filter_tee);
$r->add_output_filter(\&_output_filter_local);
}
else {
$r->add_input_filter(\&_input_filter_replay);
}
package My::TestConfig;
use strict;
use warnings;
use base qw(Apache::TestConfig);
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
# explicit call to apxs...
$self->configure_apxs;
# ... so this works.
$self->{vars}{src_dir} ||= $self->apxs('LIBEXECDIR');
$self;
}
package My::TestRun;
My::TestConfig->new($self->{conf_opts});
}
#sub pre_configure {
# my $self = shift;
# XXX dodgy, not through the interface
# my $tc = $self->{test_config} or die $!;
# map { $tc->find_and_load_module($_) } qw(proxy proxy_http proxy_connect);
# $self->SUPER::pre_configure;
#}
( run in 1.350 second using v1.01-cache-2.11-cpan-49f99fa48dc )