httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r170400 - /httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm
Date Mon, 16 May 2005 15:35:52 GMT
Author: joes
Date: Mon May 16 08:35:50 2005
New Revision: 170400

URL: http://svn.apache.org/viewcvs?rev=170400&view=rev
Log:
Admit "0" as a valid name/value for new cookies.

Modified:
    httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm

Modified: httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm?rev=170400&r1=170399&r2=170400&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm (original)
+++ httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm Mon May 16 08:35:50 2005
@@ -13,8 +13,8 @@
 
 sub new {
     my ($class, $r, %attrs) = @_;
-    my $name  = delete $attrs{name}  || delete $attrs{-name};
-    my $value = delete $attrs{value} || delete $attrs{-value};
+    my ($name)  = grep {defined} delete $attrs{name} , delete $attrs{-name};
+    my ($value) = grep {defined} delete $attrs{value}, delete $attrs{-value};
     return unless defined $name and defined $value;
 
     my $cookie = $class->make($r->pool, $name, $class->freeze($value));



Mime
View raw message