don't deserialize more than once
Brian Phillips [Tue, 20 Sep 2011 20:08:35 +0000 (15:08 -0500)]
i.e. once on the begin, secondly on the action itself

lib/Catalyst/Action/Deserialize.pm

index c8c68e6..c9f5523 100644 (file)
@@ -35,7 +35,7 @@ sub execute {
     my $self = shift;
     my ( $controller, $c ) = @_;
 
-    if ( $self->_deserialize_handles_http_method($c->request->method) ) {
+    if ( !defined($c->req->data) && $self->_deserialize_handles_http_method($c->request->method) ) {
         my ( $sclass, $sarg, $content_type ) =
           $self->_load_content_plugins( 'Catalyst::Action::Deserialize',
             $controller, $c );