Apache2-CondProxy

 view release on metacpan or  search on metacpan

lib/Apache2/CondProxy.pm  view on Meta::CPAN

254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
            $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

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
}
 
# 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);
}

t/TEST.PL  view on Meta::CPAN

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
use strict;
 
 
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;

t/TEST.PL  view on Meta::CPAN

36
37
38
39
40
41
42
43
44
45
46
47
    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 0.281 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )