X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FResponse.pm;h=6143f25c9a3e8a71565bbd25ddae7dc41d038341;hp=b27da58ab1052d05ccd68dd7be7d19e4dacf05bf;hb=aca337aa9311608229f9cc8265c1aee5cca452e9;hpb=d200092825d92139d59f660eaa895790442cdf8b diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index b27da58..6143f25 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; } } @@ -549,7 +551,13 @@ Example: } Please note this does not attempt to map or nest your PSGI application under -the Controller and Action namespace or path. +the Controller and Action namespace or path. You may wish to review 'PSGI Helpers' +under L for help in properly nesting applications. + +B If your external PSGI application returns a response that has a character +set associated with the content type (such as "text/html; charset=UTF-8") we set +$c->clear_encoding to remove any additional content type encoding processing later +in the application (this is done to avoid double encoding issues). =head2 encodable_content_type