mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
Simply use cookie.domain instead of cookie.domain_name.hostname.
This commit is contained in:
parent
f3b8abdd8e
commit
a485e83ad9
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue