Catalyst-Model-MultiAdaptor
view release on metacpan or search on metacpan
inc/Catalyst/Test.pm view on Meta::CPAN
$default_host = $opts->{default_host} if exists $opts->{default_host};
return 1;
}
}
#line 224
sub local_request {
my $class = shift;
require HTTP::Request::AsCGI;
my $request = Catalyst::Utils::request( shift(@_) );
_customize_request($request, @_);
my $cgi = HTTP::Request::AsCGI->new( $request, %ENV )->setup;
$class->handle_request( env => \%ENV );
my $response = $cgi->restore->response;
$response->request( $request );
return $response;
}
my $agent;
inc/Test/WWW/Mechanize/Catalyst.pm view on Meta::CPAN
# *where* do they want us to redirect to?
my $location = $old_response->header('Location');
# no-one *should* be returning non-absolute URLs, but if they
# are then we'd better cope with it. Let's create a new URI, using
# our request as the base.
my $uri = URI->new_abs( $location, $request->uri )->as_string;
# make a new response, and save the old response in it
$response = $self->_make_request( HTTP::Request->new( GET => $uri ) );
my $end_of_chain = $response;
while ( $end_of_chain->previous ) # keep going till the end
{
$end_of_chain = $end_of_chain->previous;
} # of the chain...
$end_of_chain->previous($old_response); # ...and add us to it
} else {
$response->{_raw_content} = $response->content;
}
( run in 0.487 second using v1.01-cache-2.11-cpan-de7293f3b23 )