From 2b911818e06fb580e5a5dc4e6fa4b92bae2f25b2 Mon Sep 17 00:00:00 2001 From: Joseph Tosey Date: Wed, 29 Mar 2023 19:55:54 -0700 Subject: [PATCH] Share dotless-domain cookies with subdomains --- lib/httpclient/webagent-cookie.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/httpclient/webagent-cookie.rb b/lib/httpclient/webagent-cookie.rb index 74dbfef9..64ca3cb3 100644 --- a/lib/httpclient/webagent-cookie.rb +++ b/lib/httpclient/webagent-cookie.rb @@ -44,7 +44,7 @@ def domain_match(host, domain) # allows; host == rubyforge.org, domain == .rubyforge.org return tail_match?(domainname, '.' + hostname) else - return (hostname == domainname) + return (hostname == domainname) || tail_match?(domainname, '.' + hostname) end end end