X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=920fe0e6e84cde964671d08ad53b215ada9a8146;hb=e3a1377127efe66e918a24b9fa5275a3d2aa51e0;hp=2c397820a8b0c5640647beb18d2d846c10cac092;hpb=7f92deef6d24d2a7618ba679892189838fcb4dfd;p=catagits%2FCatalyst-Runtime.git
diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm
index 2c39782..920fe0e 100644
--- a/lib/Catalyst/Engine.pm
+++ b/lib/Catalyst/Engine.pm
@@ -47,7 +47,7 @@ sub finalize_body {
if ( ref $c->response->body && $c->response->body->can('read') ) {
while ( !$c->response->body->eof() ) {
$c->response->body->read( my $buffer, $CHUNKSIZE );
- $self->write( $c, $buffer );
+ last unless $self->write( $c, $buffer );
}
$c->response->body->close();
}
@@ -90,7 +90,7 @@ sub finalize_cookies {
sub finalize_error {
my ( $self, $c ) = @_;
- $c->res->headers->content_type('text/html');
+ $c->res->content_type('text/html; charset=utf-8');
my $name = $c->config->{name} || 'Catalyst Application';
my ( $title, $error, $infos );
@@ -99,10 +99,11 @@ sub finalize_error {
# For pretty dumps
local $Data::Dumper::Terse = 1;
$error = join '',
- map { '' . encode_entities($_) . '
' }
+ map { '
' . encode_entities($_) . '
%s", $_->[0], - encode_entities( Dumper $_->[1] ) - } $c->dump_these - ); + my @infos; + my $i = 0; + for my $dump ( $c->dump_these ) { + my $name = $dump->[0]; + my $value = encode_entities( Dumper $dump->[1] ); + push @infos, sprintf <<"EOF", $name, $value; +
%s+