[Catalyst-commits] r11203 - in Catalyst-Plugin-Session-State-Cookie/trunk: . lib/Catalyst/Plugin/Session/State

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Sat Aug 22 16:12:25 GMT 2009


Author: rafl
Date: 2009-08-22 16:12:25 +0000 (Sat, 22 Aug 2009)
New Revision: 11203

Modified:
   Catalyst-Plugin-Session-State-Cookie/trunk/Changes
   Catalyst-Plugin-Session-State-Cookie/trunk/lib/Catalyst/Plugin/Session/State/Cookie.pm
Log:
Allow turning off the httponly option (Closes RT#48930).

Modified: Catalyst-Plugin-Session-State-Cookie/trunk/Changes
===================================================================
--- Catalyst-Plugin-Session-State-Cookie/trunk/Changes	2009-08-22 15:49:38 UTC (rev 11202)
+++ Catalyst-Plugin-Session-State-Cookie/trunk/Changes	2009-08-22 16:12:25 UTC (rev 11203)
@@ -1,5 +1,7 @@
 Revision history for Perl extension Catalyst::Plugin::Session::State::Cookie
 
+        - Allow turning off the httponly option (Closes RT#48930).
+
 0.13    2009-08-19
         - Remove Test::MockObject from the test suite as prone to failing on
           some platforms and perl versions due to its UNIVERSAL:: package
@@ -10,7 +12,7 @@
           replace_constructor at scope end handling.
 
 0.12    2009-07-18
-        - Introduced a new option cookie_httponly 
+        - Introduced a new option cookie_httponly
         - Option cookie_secure extended (old syntax fully supported)
 
 0.11    2009-05-13
@@ -22,7 +24,7 @@
         - Switch from NEXT to MRO::Compat
 
 0.09    2007-10-08
-        - Bump dependencies so that streaming a file also causes the cookie to 
+        - Bump dependencies so that streaming a file also causes the cookie to
           be updated.
           - Add tests for this
 
@@ -43,7 +45,7 @@
 0.04
         - Depend on a higher version of C::P::Session
 
-0.03 
+0.03
         - refactored make_session_cookie to separate calc_expiry, and made
 	      that easily overloadable.
         - updated for the new state API (get_session_id, set_session_id, etc)

Modified: Catalyst-Plugin-Session-State-Cookie/trunk/lib/Catalyst/Plugin/Session/State/Cookie.pm
===================================================================
--- Catalyst-Plugin-Session-State-Cookie/trunk/lib/Catalyst/Plugin/Session/State/Cookie.pm	2009-08-22 15:49:38 UTC (rev 11202)
+++ Catalyst-Plugin-Session-State-Cookie/trunk/lib/Catalyst/Plugin/Session/State/Cookie.pm	2009-08-22 16:12:25 UTC (rev 11203)
@@ -77,8 +77,8 @@
     $cookie->{secure} = 1 unless ( ($sec==0) || ($sec==2) );
     $cookie->{secure} = 1 if ( ($sec==2) && $c->req->secure );
 
-    my $hto = $cookie->{httponly} || 1; # default = 1 (set httponly)
-    $cookie->{httponly} = 1 unless ($hto==0);
+    $cookie->{httponly} = 1
+        unless exists $cookie->{httponly}; # default = 1 (set httponly)
 
     return $cookie;
 }




More information about the Catalyst-commits mailing list