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