summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CGI.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/CGI.pl b/CGI.pl
index 8f412665e..a0a0cfd72 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -1064,7 +1064,9 @@ if (defined $ENV{"HTTP_COOKIE"}) {
foreach my $pair (split(/;/, $ENV{"HTTP_COOKIE"})) {
$pair = trim($pair);
if ($pair =~ /^([^=]*)=(.*)$/) {
- $::COOKIE{$1} = $2;
+ if (!exists($::COOKIE{$1})) {
+ $::COOKIE{$1} = $2;
+ }
} else {
$::COOKIE{$pair} = "";
}