[interchange] Teach read_cookie() to return all cookie when an empty cookie name is provided

David Christensen <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
commit 4e79a632516d139ca343f30767af82e576d717a0
Author: David Christensen <[email protected]>
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);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.