Back compat fix for Gitalist
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize / View.pm
index fbfa7f4..1cc4bf6 100644 (file)
@@ -11,6 +11,10 @@ sub execute {
     my $self = shift;
     my ( $controller, $c, $view ) = @_;
 
+    # Views don't care / are not going to render an entity for 3XX
+    # responses.
+    return 1 if $c->response->status =~ /^(?:204|3\d\d)$/;
+
     my $stash_key = (
             $controller->{'serialize'} ?
                 $controller->{'serialize'}->{'stash_key'} :