From: Tomas Doran Date: Thu, 17 Nov 2011 10:50:31 +0000 (+0000) Subject: Fix removed methods that plugins are likely to be hooking X-Git-Tag: 5.90008~16^2~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=41aaa5d65dfd130dd0376d3fa41a3f2ab78c066a Fix removed methods that plugins are likely to be hooking --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 571f260..d458962 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2030,6 +2030,8 @@ sub prepare { $c->prepare_request(@arguments); $c->prepare_connection; $c->prepare_query_parameters; + $c->prepare_headers; # Just hooks, no longer needed - they just + $c->prepare_cookies; # cause the lazy attribute on req to build $c->prepare_path; # Prepare the body for reading, either by prepare_body @@ -2126,6 +2128,24 @@ sub prepare_connection { $c->engine->prepare_connection($c); } +=head2 $c->prepare_cookies + +Prepares cookies by ensuring that the attribute on the request +object has been built. + +=cut + +sub prepare_cookies { my $c = shift; $c->request->cookies } + +=head2 $c->prepare_headers + +Prepares request headers by ensuring that the attribute on the request +object has been built. + +=cut + +sub prepare_headers { my $c = shift; $c->request->headers } + =head2 $c->prepare_parameters Prepares parameters. @@ -2976,6 +2996,9 @@ your output data, if known. sub write { my $c = shift; + # Finalize headers if someone manually writes output (for compat) + $c->finalize_headers; + return $c->response->write( @_ ); }