[Mono-bugs] [Bug 421827] [PATCH] CookieContainer.GetCookie skips cookie when domain has no leading dot
    bugzilla_noreply at novell.com 
    bugzilla_noreply at novell.com
       
    Wed Feb 25 18:17:26 EST 2009
    
    
  
https://bugzilla.novell.com/show_bug.cgi?id=421827
User Dax at daxxfiles.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=421827#c6
--- Comment #6 from - - <Dax at daxxfiles.net>  2009-02-25 16:17:25 MST ---
How about
static bool CheckDomain (string domain, string host)
{
    if (domain == "") {
        return false;
    } else if (domain[0] != ".") {
        domain = "." + domain;
    }
    if (host.Length != "" && host[0] != ".") {
        host = "." + host;
    }
    return host.EndsWith(domain);
}
-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
    
    
More information about the mono-bugs
mailing list