RequireSSL 0.06, no_cache option, work properly under restarter and POE servers
[catagits/Catalyst-Plugin-RequireSSL.git] / lib / Catalyst / Plugin / RequireSSL.pm
index 0b72c8a..8bed9ab 100644 (file)
@@ -64,8 +64,6 @@ sub setup {
 
     # disable the plugin when running under certain engines which don't
     # support SSL
-    # XXX: I didn't include Catalyst::Engine::Server here as it may be used as
-    # a backend in a proxy setup.
     if ( $c->engine =~ /Catalyst::Engine::HTTP/ ) {
         $c->config->{require_ssl}->{disabled} = 1;
         $c->log->warn( "RequireSSL: Disabling SSL redirection while running "
@@ -103,10 +101,12 @@ sub _redirect_uri {
             }
         }
         $redir .= '?' . join( '&', @params );
-    }        
-       if($c->config->{require_ssl}->{'no_cache'}) {           
-           $c->config->{require_ssl}->{$type} = undef;
+    }  
+          
+       if ( $c->config->{require_ssl}->{no_cache} ) {          
+           delete $c->config->{require_ssl}->{$type};
        }
+       
     return $redir;
 }
 
@@ -174,7 +174,7 @@ users will be redirected back to non-SSL mode as soon as possible.
        no_cache 
 
 If you have a wildcard certificate you will need to set this option if you are
-using multiple domains on one instance of catalyst.
+using multiple domains on one instance of Catalyst.
 
 =head1 METHODS