Adding upstream version 0.5.2

This commit is contained in:
Tatsuya Kinoshita
2011-05-04 16:23:02 +09:00
parent 72f72d64a4
commit 6db339b3d7
72 changed files with 7191 additions and 4808 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: cookie.c,v 1.9 2003/09/26 17:59:51 ukai Exp $ */
/* $Id: cookie.c,v 1.10 2006/12/10 10:53:22 inu Exp $ */
/*
* References for version 0 cookie:
@@ -65,6 +65,13 @@ domain_match(char *host, char *domain)
if (domain[1] == '\0' || contain_no_dots(host, domain_p))
return domain_p;
}
/*
* special case for domainName = .hostName
* see nsCookieService.cpp in Firefox.
*/
else if (domain[0] == '.' && strcasecmp(host, &domain[1]) == 0) {
return host;
}
/* [RFC 2109] s. 2, cases 2, 3 */
else {
offset = (domain[0] != '.') ? 0 : strlen(host) - strlen(domain);