From: Robert Rothenberg Date: Thu, 19 Jun 2014 16:40:39 +0000 (+0100) Subject: Changed to die rather than set response X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=5ffaafbdd9a899411ed53a6c677d17d80ed841aa Changed to die rather than set response --- diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index a3b65af..35432a0 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -282,8 +282,8 @@ sub redirect { my $location = shift; my $status = shift || 302; + $self->location($location); $self->status($status); - $self->location($location); # overwrites status if invalid } @@ -300,9 +300,7 @@ around '_set_location' => sub { if ( $location =~ m/[\n\r]/ ) { # check for header injection - $self->status(400); # bad request - - # TODO: warn about this or fail + die "blocking header injection"; } else {