mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-04-27 14:57:46 +00:00
Use case-when.
This commit is contained in:
parent
1d9dc5754c
commit
25630b35e7
1 changed files with 4 additions and 3 deletions
|
|
@ -521,9 +521,10 @@ class HTTP::Cookie
|
||||||
host = DomainName.new(uri.host)
|
host = DomainName.new(uri.host)
|
||||||
|
|
||||||
# RFC 6265 5.3
|
# RFC 6265 5.3
|
||||||
return true if host.hostname == @domain
|
case
|
||||||
|
when host.hostname == @domain
|
||||||
if @for_domain # !host-only-flag
|
true
|
||||||
|
when @for_domain # !host-only-flag
|
||||||
host.cookie_domain?(@domain_name)
|
host.cookie_domain?(@domain_name)
|
||||||
else
|
else
|
||||||
@domain.nil?
|
@domain.nil?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue