# This file documents the revision history for Perl extension Catalyst.
+ Bug fixes:
+ - Fix request body parameters is undef with no parameters
+
5.90012 - 2012-05-16 09:59:00
Distribution META.yml changes:
my ( $self ) = @_;
$self->prepare_body if ! $self->_has_body;
- return unless $self->_body;
+ return {} unless $self->_body;
return $self->_body->param;
}
$c->res->status(200);
}
+sub no_params : Local {
+ my ( $self, $c ) = @_;
+ my $params = $c->req->body_parameters;
+ $c->res->output(ref $params);
+ $c->res->status(200);
+}
+
1;
is($response, 'that', 'body param overridden');
}
+{
+ my $response = request( POST( '/bodyparams/no_params' ) )->content;
+ is($response, 'HASH', 'empty body param is hashref');
+}
+
done_testing;