X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=7e12cd64821daee2e29adfeedff046eb16047bdd;hp=c8eab059f0672a5c4b46f45bf84a624effcb868a;hb=3a228200758cbd1d7a12784908d126627fa06eeb;hpb=f380e881ad21f7e7da0771efb32afaace606baa4 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index c8eab05..7e12cd6 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -180,7 +180,7 @@ sub composed_stats_class { __PACKAGE__->_encode_check(Encode::FB_CROAK | Encode::LEAVE_SRC); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.90092'; +our $VERSION = '5.90093'; $VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases sub import { @@ -2228,9 +2228,10 @@ sub finalize_encoding { # Set the charset if necessary. This might be a bit bonkers since encodable response # is false when the set charset is not the same as the encoding mimetype (maybe # confusing action at a distance here.. - # Don't try to set the charset if one already exists + # Don't try to set the charset if one already exists or if headers are already finalized $c->res->content_type($c->res->content_type . "; charset=" . $c->encoding->mime_name) - unless($c->res->content_type_charset); + unless($c->res->content_type_charset || + ($c->res->_context && $c->res->finalized_headers && !$c->res->_has_response_cb)); } }