Fix RT#49267
Tomas Doran [Tue, 13 Apr 2010 22:18:19 +0000 (22:18 +0000)]
Changes
lib/Catalyst/Engine/HTTP.pm

diff --git a/Changes b/Changes
index aa7f2f5..44cb13b 100644 (file)
--- 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
index 30ddbc4..97cd8d6 100644 (file)
@@ -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
     ) {