# File lib/mechanize/cookie.rb, line 197 def acceptable_from_uri?(uri) host = DomainName.new(uri.host) # RFC 6265 5.3 # When the user agent "receives a cookie": return host.hostname == domain unless @for_domain if host.cookie_domain?(@domain_name) true elsif host.hostname == domain @for_domain = false true else false end end