Fix broken HTTP engine after botched merge from 2 weeks ago
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Request.pm
index 7bebb4c..496682d 100644 (file)
@@ -144,9 +144,11 @@ C<application/x-www-form-urlencoded> or C<multipart/form-data>.
 =cut
 
 sub body {
-    my ( $self, $body ) = @_;
+    my $self = shift;
     $self->{_context}->prepare_body;
-    $self->{_body}->body($body) if $body;
+    
+    return unless $self->{_body};
+    
     return $self->{_body}->body;
 }