domain_match (WebAgent::CookieUtils)

    # File lib/httpclient/cookie.rb, line 34
        def domain_match(host, domain)
          domainname = domain.sub(/\.\z/, '').downcase
          hostname = host.sub(/\.\z/, '').downcase
          case domain
          when /\d+\.\d+\.\d+\.\d+/
            return (hostname == domainname)
          when '.'
            return true
          when /^\./
            # allows; host == rubyforge.org, domain == .rubyforge.org
            return tail_match?(domainname, '.' + hostname)
          else
            return (hostname == domainname)
          end
        end