# File lib/httpclient/cookie.rb, line 34 34: def domain_match(host, domain) 35: domainname = domain.sub(/\.\z/, '').downcase 36: hostname = host.sub(/\.\z/, '').downcase 37: case domain 38: when /\d+\.\d+\.\d+\.\d+/ 39: return (hostname == domainname) 40: when '.' 41: return true 42: when /^\./ 43: # allows; host == rubyforge.org, domain == .rubyforge.org 44: return tail_match?(domainname, '.' + hostname) 45: else 46: return (hostname == domainname) 47: end 48: end
# File lib/httpclient/cookie.rb, line 22 22: def head_match?(str1, str2) 23: str1 == str2[0, str1.length] 24: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.