Fix default OPTIONS handler
Wallace Reis [Mon, 11 Jun 2012 12:39:04 +0000 (14:39 +0200)]
As the ->body is defined, then serialization won't happen and we don't
wrong responses as from failing tests in prev commit.

lib/Catalyst/Action/REST.pm

index bc715f6..9787eef 100644 (file)
@@ -159,6 +159,7 @@ sub _return_options {
     $c->response->content_type('text/plain');
     $c->response->status(200);
     $c->response->header( 'Allow' => \@allowed );
+    $c->response->body(q{});
 }
 
 sub _return_not_implemented {