From: John Napiorkowski Date: Wed, 7 Jan 2015 22:44:04 +0000 (-0600) Subject: docs and ready for release testing X-Git-Tag: 5.90079_008~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=51b34249806efbb5eb2572baf32ebaf619840d17 docs and ready for release testing --- diff --git a/Changes b/Changes index a91032d..2e1912a 100644 --- a/Changes +++ b/Changes @@ -4,7 +4,7 @@ - If we get a response set from $res->from_psgi_response and that response has a charset for the content type, we clear encoding for the rest of the response (avoid double encoding). - - + - Documentation updates and typo fixes across various UTF8 docs (Mark Ellis++) 5.90079_007 - 2015-01-07 - Merged from Stable (5.90079) diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index f3f86f2..dede663 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -129,7 +129,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); __PACKAGE__->_encode_check(Encode::FB_CROAK | Encode::LEAVE_SRC); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.90079_007'; +our $VERSION = '5.90079_008'; $VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases sub import { @@ -3632,7 +3632,7 @@ sub default_data_handlers { return eval { local $/; $slurped = $fh->getline; - $parser->can("decode_json")->($slurped); + $parser->can("decode_json")->($slurped); # decode_json does utf8 decoding for us } || Catalyst::Exception->throw(sprintf "Error Parsing POST '%s', Error: %s", (defined($slurped) ? $slurped : 'undef') ,$@); }, }; diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index b27da58..a3580ff 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -169,6 +169,8 @@ sub from_psgi_response { # to assume its properly encoded and NOT encode for this response. Otherwise # We risk double encoding. if($self->content_type_charset) { + # We have to do this since for backcompat reasons having a charset doesn't always + # mean that the body is already encoded :( $self->_context->clear_encoding; } } diff --git a/lib/Catalyst/Runtime.pm b/lib/Catalyst/Runtime.pm index a4e2346..1cd18a6 100644 --- a/lib/Catalyst/Runtime.pm +++ b/lib/Catalyst/Runtime.pm @@ -7,7 +7,7 @@ BEGIN { require 5.008003; } # Remember to update this in Catalyst as well! -our $VERSION = '5.90079_007'; +our $VERSION = '5.90079_008'; $VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases =head1 NAME