Catalyst-Engine-Apache
view release on metacpan or search on metacpan
1.13_01
- Update tests to pass again.
- Update tests to not throw warnings with newer versions of Catalyst.
- Fix $c->req->remote_user with this engine.
- Clarify use with non-standard ports.
- Fixes RT#61707, RT#61706, RT#61704, RT#36829
1.13
- Workaround change in LWP that broke a cookie test (RT #40037)
- Update streaming test to latest 5.70
1.12 2008-02-20 09:00:00
- Fixed bug where %2b in query parameter is doubly decoded to ' ', instead of '+'
(Gavin Henry, Tatsuhiko Miyagawa)
- Fixed bug where req->base and req->uri would include a port number when running
in SSL mode.
- Fixed warning when a non-trivial regex is used in a LocationMatch block.
(Steffen Schwigon)
- Clear the value of $c->engine->return() before each request.
- Added support for 'PerlSetVar CatalystDisableLocationMatch 1' to disable check
t/author-live_component_controller_action_end.t
t/author-live_component_controller_action_forward.t
t/author-live_component_controller_action_global.t
t/author-live_component_controller_action_index.t
t/author-live_component_controller_action_inheritance.t
t/author-live_component_controller_action_local.t
t/author-live_component_controller_action_multipath.t
t/author-live_component_controller_action_path.t
t/author-live_component_controller_action_private.t
t/author-live_component_controller_action_regexp.t
t/author-live_component_controller_action_streaming.t
t/author-live_component_controller_args.t
t/author-live_engine_request_body.t
t/author-live_engine_request_body_demand.t
t/author-live_engine_request_cookies.t
t/author-live_engine_request_headers.t
t/author-live_engine_request_parameters.t
t/author-live_engine_request_uploads.t
t/author-live_engine_request_uri.t
t/author-live_engine_response_cookies.t
t/author-live_engine_response_errors.t
t/author-live_component_controller_action_streaming.t view on Meta::CPAN
require Benchmark;
Benchmark::timethis( $iters, \&run_tests );
}
else {
for ( 1 .. $iters ) {
run_tests();
}
}
sub run_tests {
# test direct streaming
{
ok( my $response = request('http://localhost/streaming'), 'Request' );
ok( $response->is_success, 'Response Successful 2xx' );
is( $response->content_type, 'text/plain', 'Response Content-Type' );
SKIP:
{
if ( $ENV{CATALYST_SERVER} ) {
skip "Using remote server", 1;
}
# XXX: Length should be undef here, but HTTP::Request::AsCGI sets it
is( $response->content_length, 12, 'Response Content-Length' );
}
is( $response->content,, <<'EOF', 'Content is a stream' );
foo
bar
baz
EOF
}
# test streaming by passing a handle to $c->res->body
SKIP:
{
if ( $ENV{CATALYST_SERVER} ) {
skip "Using remote server", 5;
}
my $file = "$FindBin::Bin/lib/TestApp/Controller/Action/Streaming.pm";
my $fh = IO::File->new( $file, 'r' );
my $buffer;
if ( defined $fh ) {
$fh->read( $buffer, 1024 );
$fh->close;
}
ok( my $response = request('http://localhost/action/streaming/body'),
'Request' );
ok( $response->is_success, 'Response Successful 2xx' );
is( $response->content_type, 'text/plain', 'Response Content-Type' );
is( $response->content_length, -s $file, 'Response Content-Length' );
is( $response->content, $buffer, 'Content is read from filehandle' );
}
}
t/lib/TestApp/Controller/Action/Streaming.pm view on Meta::CPAN
package TestApp::Controller::Action::Streaming;
use strict;
use base 'TestApp::Controller::Action';
sub streaming : Global {
my ( $self, $c ) = @_;
for my $line ( split "\n", <<'EOF' ) {
foo
bar
baz
EOF
$c->res->write("$line\n");
}
}
( run in 0.301 second using v1.01-cache-2.11-cpan-4d50c553e7e )