[interchange] Teach read_cookie() to return all cookie when an empty cookie name is provided
David Christensen
interchange-cvs at icdevgroup.org
Sat Jun 18 23:55:36 UTC 2011
commit 4e79a632516d139ca343f30767af82e576d717a0
Author: David Christensen <david at endpoint.com>
Date: Sat Jun 18 18:52:31 2011 -0500
Teach read_cookie() to return all cookie when an empty cookie name is provided
lib/Vend/Util.pm | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/lib/Vend/Util.pm b/lib/Vend/Util.pm
index 1f711a1..1026925 100644
--- a/lib/Vend/Util.pm
+++ b/lib/Vend/Util.pm
@@ -2006,6 +2006,7 @@ sub read_cookie {
my ($lookfor, $string) = @_;
$string = $CGI::cookie
unless defined $string;
+ return cookies_hash($string) unless defined $lookfor && length($lookfor);
return undef unless $string =~ /(?:^|;)\s*\Q$lookfor\E=([^\s;]+)/i;
return unescape_chars($1);
}
More information about the interchange-cvs
mailing list