[Catalyst-commits] r13528 - in Catalyst-Runtime/5.80/trunk: . lib t/aggregate

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Wed Aug 25 13:46:22 GMT 2010


Author: t0m
Date: 2010-08-25 14:46:22 +0100 (Wed, 25 Aug 2010)
New Revision: 13528

Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
   Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_env.t
Log:
Fix bug with parse_on_demand

Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2010-08-25 09:04:13 UTC (rev 13527)
+++ Catalyst-Runtime/5.80/trunk/Changes	2010-08-25 13:46:22 UTC (rev 13528)
@@ -1,5 +1,12 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+ Bug fixes:
+  - parse_on_demand fixed when used in conjunction with debug mode.
+    A regression was introduced in 5.80022 which would cause the body
+    to always be parsed for logging at the end of the request when in
+    debug mode. This has been fixed so that if the body has not been parsed
+    by the time the request is logged, then the body is omitted.
+
 5.80025 2010-07-29 01:50:00
 
  New features:

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm	2010-08-25 09:04:13 UTC (rev 13527)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm	2010-08-25 13:46:22 UTC (rev 13528)
@@ -2150,7 +2150,7 @@
         $c->log->debug("Query keywords are: $keywords");
     }
 
-    $c->log_request_parameters( query => $request->query_parameters, body => $request->body_parameters );
+    $c->log_request_parameters( query => $request->query_parameters, $request->_has_body ? (body => $request->body_parameters) : () );
 
     $c->log_request_uploads($request);
 }

Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_env.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_env.t	2010-08-25 09:04:13 UTC (rev 13527)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_env.t	2010-08-25 13:46:22 UTC (rev 13528)
@@ -17,13 +17,15 @@
          = "Test env value " . rand(100000);
 }
 
-use Test::More tests => 7;
+use Test::More;
 use Catalyst::Test 'TestApp';
 
 use Catalyst::Request;
 use HTTP::Headers;
 use HTTP::Request::Common;
 
+plan skip_all => 'Does not work in live tests' if ( $ENV{CATALYST_SERVER} );
+
 {
     my $env;
 
@@ -45,3 +47,5 @@
     }
 }
 
+done_testing;
+




More information about the Catalyst-commits mailing list