X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FREST.pm;h=892fb9bc79868947d9bae6035f9ad3bf8827ce18;hb=33e5de96f7c37e7b64611c77d305b1bf8d26b2d6;hp=c2393ec4098b618a38da99dd075ec1b44190b749;hpb=398c5a1bfa52e417d07af96341ec75424dd519ed;p=catagits%2FCatalyst-Action-Serialize-Data-Serializer.git diff --git a/lib/Catalyst/Controller/REST.pm b/lib/Catalyst/Controller/REST.pm index c2393ec..892fb9b 100644 --- a/lib/Catalyst/Controller/REST.pm +++ b/lib/Catalyst/Controller/REST.pm @@ -175,6 +175,8 @@ sub status_created { my $location; if (ref($p{'location'})) { $location = $p{'location'}->as_string; + } else { + $location = $p{'location'}; } $c->response->status(201); $c->response->header('Location' => $location); @@ -220,9 +222,7 @@ Example: $self->status_bad_request( $c, - entity => { - message => "Cannot do what you have asked!", - } + message => "Cannot do what you have asked!", ); =cut @@ -251,9 +251,7 @@ Example: $self->status_not_found( $c, - entity => { - message => "Cannot find what you were looking for!", - } + message => "Cannot find what you were looking for!", ); =cut