From: Christian Hansen Date: Sat, 2 Apr 2005 06:05:34 +0000 (+0000) Subject: don't give 'No Output' error on 1xx or 3xx status X-Git-Tag: 5.7099_04~1624 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=49490aabb7ab968b286f283d03c1816954c92e1f don't give 'No Output' error on 1xx or 3xx status --- diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index b469d70..98a5f92 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -161,7 +161,7 @@ sub finalize { $c->finalize_cookies; - if ( my $location = $c->res->redirect ) { + if ( my $location = $c->response->redirect ) { $c->log->debug(qq/Redirecting to "$location"/) if $c->debug; $c->response->header( Location => $location ); $c->response->status(302); @@ -171,13 +171,13 @@ sub finalize { $c->finalize_error; } - if ( !$c->res->output && $c->res->status !~ /^(1\d\d|[23]04)$/ ) { + if ( !$c->response->output && $c->response->status !~ /^(1|3)\d\d)$/ ) { $c->finalize_error; } - if ( $c->res->output ) { + if ( $c->response->output ) { use bytes; # play safe with a utf8 aware perl - $c->response->content_length( length $c->res->output ); + $c->response->content_length( length $c->response->output ); } my $status = $c->finalize_headers;