[Catalyst] Catalyst::Plugin::DefaultEnd - returning a false string (zeroes)

ADSJ (Adam Sjøgren) adsj at novozymes.com
Fri Apr 7 14:44:13 CEST 2006


  Hi.


Here is a tiny patch for Catalyst::Plugin::DefaultEnd that makes
setting $c->response->body to '0' (or '000000') work as expected.


--- DefaultEnd.pm.orig	2006-03-01 15:37:37.000000000 +0100
+++ DefaultEnd.pm	2006-03-01 15:42:46.000000000 +0100
@@ -38,7 +38,7 @@
     my ( $self, $c ) = @_;
     die "forced debug" if $c->debug && $c->req->params->{dump_info};
     return 1 if $c->response->status =~ /^3\d\d$/;
-    return 1 if $c->response->body;                         
+    return 1 if length $c->response->body;
     unless ( $c->response->content_type ) {
        $c->response->content_type('text/html; charset=utf-8');
     }


  Best regards,

    Adam

-- 
                                                          Adam Sjøgren
                                                    adsj at novozymes.com



More information about the Catalyst mailing list