Fixed a bug where path is not set to / by default.
[catagits/Web-Session.git] / lib / Plack / Session / State / Cookie.pm
index 9ea7a68..9be093c 100644 (file)
@@ -27,11 +27,12 @@ sub merge_options {
 
     delete $options{id};
 
-    $options{path}     = $self->path || '/' if !exists $options{path} && defined $self->path;
+    $options{path}     = $self->path || '/' if !exists $options{path};
     $options{domain}   = $self->domain      if !exists $options{domain} && defined $self->domain;
     $options{secure}   = $self->secure      if !exists $options{secure} && defined $self->secure;
     $options{httponly} = $self->httponly    if !exists $options{httponly} && defined $self->httponly;
 
+
     if (!exists $options{expires} && defined $self->expires) {
         $options{expires} = time + $self->expires;
     }