From: Tomas Doran Date: Tue, 13 Apr 2010 22:18:19 +0000 (+0000) Subject: Fix RT#49267 X-Git-Tag: 5.80023~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=c6d27fac181281525ebd34df2a1fb81beaa11698 Fix RT#49267 --- diff --git a/Changes b/Changes index aa7f2f5..44cb13b 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,8 @@ - Ensure to always cleanup temporary uploaded files in all cases, even when exceptions occur during request processing, using HTTP::Body's ->cleanup feature. (RT#41442) + - Ensure that Catalyst::Engine::HTTP's options hash is defined before + dereferencing it. (RT#49267) New features: - Setting __PACKAGE__->config(enable_catalyst_header => 1); in your MyApp.pm diff --git a/lib/Catalyst/Engine/HTTP.pm b/lib/Catalyst/Engine/HTTP.pm index 30ddbc4..97cd8d6 100644 --- a/lib/Catalyst/Engine/HTTP.pm +++ b/lib/Catalyst/Engine/HTTP.pm @@ -68,7 +68,8 @@ sub finalize_headers { # Should we keep the connection open? my $connection = $c->request->header('Connection'); - if ( $self->options->{keepalive} + if ( $self->options + && $self->options->{keepalive} && $connection && $connection =~ /^keep-alive$/i ) {