X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=c4d915a9a3179e7f50721ec04ae0bb330b04d684;hb=22faeff5f7d88f6f9c4cd73077e9428651cd8713;hp=2cdabedf20414f13de21925826a09265a58b4750;hpb=1ce9c7f6a57e3d3ce511d87eb68c6a66ce9d96be;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 2cdabed..c4d915a 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2025,6 +2025,7 @@ sub prepare { $c->prepare_body; } } + $c->prepare_action; } # VERY ugly and probably shouldn't rely on ->finalize actually working catch { @@ -2032,19 +2033,19 @@ sub prepare { $c->response->status(400); $c->response->content_type('text/plain'); $c->response->body('Bad Request'); + # Note we call finalize and then die here, which escapes + # finalize being called in the enclosing block.. + # It in fact couldn't be called, as we don't return $c.. + # This is a mess - but I'm unsure you can fix this without + # breaking compat for people doing crazy things (we should set + # the 400 and just return the ctx here IMO, letting finalize get called + # above... $c->finalize; die $_; }; - my $method = $c->req->method || ''; - my $path = $c->req->path; - $path = '/' unless length $path; - my $address = $c->req->address || ''; - $c->log_request; - $c->prepare_action; - return $c; } @@ -2749,7 +2750,7 @@ sub apply_default_middlewares { condition => sub { my ($env) = @_; return unless $env->{SERVER_SOFTWARE} && $env->{SERVER_SOFTWARE} =~ m!lighttpd[-/]1\.(\d+\.\d+)!; - return unless $env < 4.23; + return unless $1 < 4.23; 1; }, );