From a485e83ad99fcbbb3ff17524f52446c046bcee3e Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Fri, 12 Apr 2013 01:19:49 +0900 Subject: [PATCH] Simply use cookie.domain instead of cookie.domain_name.hostname. --- lib/http/cookie_jar/hash_store.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/http/cookie_jar/hash_store.rb b/lib/http/cookie_jar/hash_store.rb index 3624cab..050358e 100644 --- a/lib/http/cookie_jar/hash_store.rb +++ b/lib/http/cookie_jar/hash_store.rb @@ -55,14 +55,14 @@ class HTTP::CookieJar end def add(cookie) - path_cookies = ((@jar[cookie.domain_name.hostname] ||= {})[cookie.path] ||= {}) + path_cookies = ((@jar[cookie.domain] ||= {})[cookie.path] ||= {}) path_cookies[cookie.name] = cookie cleanup if (@gc_index += 1) >= @gc_threshold self end def delete(cookie) - path_cookies = ((@jar[cookie.domain_name.hostname] ||= {})[cookie.path] ||= {}) + path_cookies = ((@jar[cookie.domain] ||= {})[cookie.path] ||= {}) path_cookies.delete(cookie.name) self end