Merge branch 'pr/157' into release-candidates/rc-5.90116
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Request.pm
index c4d7764..e6e8657 100644 (file)
@@ -123,7 +123,7 @@ sub _build_body_data {
 
     # Not sure if these returns should not be exceptions...
     my $content_type = $self->content_type || return;
-    return unless ($self->method eq 'POST' || $self->method eq 'PUT');
+    return unless ($self->method eq 'POST' || $self->method eq 'PUT' || $self->method eq 'PATCH');
 
     my ($match) = grep { $content_type =~/$_/i }
       keys(%{$self->data_handlers});
@@ -136,7 +136,7 @@ sub _build_body_data {
       Catalyst::Exception->throw(
         sprintf '%s does not have an available data handler. Valid data_handlers are %s.',
           $content_type, join ', ', sort keys %{$self->data_handlers}
-         );
+      );
     }
 }