diff --git a/lib/HTTP/Cookies.pm b/lib/HTTP/Cookies.pm index e0a75d0d..5a452aa6 100644 --- a/lib/HTTP/Cookies.pm +++ b/lib/HTTP/Cookies.pm @@ -396,6 +396,7 @@ sub set_cookie $key, $val, $path, $domain, $port, $path_spec, $secure, $maxage, $discard, $rest) = @_; + $domain = "$domain.local" unless $domain =~ /\./; # path and key can not be empty (key can't start with '$') return $self if !defined($path) || $path !~ m,^/, || !defined($key) || $key =~ m,^\$,;