X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=af9f2b28f662ba18b4abb62702ca0d46ae4a9087;hb=f21993513cc09ce7aec7b551bec107dd192d5905;hp=84c75e9d3a27b1ffe45da3878560016d8f2d475d;hpb=3ed5a3fb2fbee3b3c89025071458597a6fb21992;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 84c75e9..af9f2b2 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -45,9 +45,12 @@ has _response_cb => ( predicate => '_has_response_cb', ); +subtype 'Catalyst::Engine::Types::Writer', + as duck_type([qw(write close)]); + has _writer => ( is => 'ro', - isa => duck_type([qw(write close)]), + isa => 'Catalyst::Engine::Types::Writer', writer => '_set_writer', clearer => '_clear_writer', ); @@ -128,6 +131,11 @@ sub finalize_cookies { -httponly => $val->{httponly} || 0, ) ); + if (!defined $cookie) { + $c->log->warn("undef passed in '$name' cookie value - not setting cookie") + if $c->debug; + next; + } push @cookies, $cookie->as_string; } @@ -670,7 +678,7 @@ sub prepare_read { =head2 $self->prepare_request(@arguments) -Populate the context object from the request object. +Sets up the PSGI environment in the Engine (just for back compat). =cut @@ -825,13 +833,13 @@ sub run { # instead the $app->handle method is called per request. $app->log->warn("Not supplied a Plack engine, falling back to engine auto-loader (are your scripts ancient?)") } + $app->run_options($options); $server->run($psgi, $options); } =head2 build_psgi_app ($app, @args) -Builds and returns a PSGI application closure, wrapping it in the reverse proxy -middleware if the using_frontend_proxy config setting is set. +Builds and returns a PSGI application closure. (Raw, not wrapped in middleware) =cut