Skip to content

Commit

Permalink
patch from Mike Hanafey to prevent CGI::Cooke from interpreting 0 val…
Browse files Browse the repository at this point in the history
…ues as equivalent to empty
  • Loading branch information
lstein committed Feb 13, 2006
1 parent 7dc345f commit f89a16b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CGI/Cookie.pm
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ sub as_string {
push(@constant_values,"secure") if $secure = $self->secure;

my($key) = escape($self->name);
my($cookie) = join("=",($key||''),join("&",map escape($_||''),$self->value));
my($cookie) = join("=",(defined $key ? $key : ''),join("&",map escape(defined $_ ? $_ : ''),$self->value));
return join("; ",$cookie,@constant_values);
}

Expand Down
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 3.17 ??
1. Added patch from Mike Hanafey which caused 0 arguments to CGI::Cookie->new() to
be treated as empty.

Version 3.16 Tue Dec 27 13:54:19 EST 2005
1. header() -charset option now works even when the MIME type is not "text".
2. Fixed documentation for cookie() function and fastCGI.
Expand Down

0 comments on commit f89a16b

Please sign in to comment.