diff options
author | Dai Sato <satodai@w3m.jp> | 2006-12-10 10:53:22 +0000 |
---|---|---|
committer | Dai Sato <satodai@w3m.jp> | 2006-12-10 10:53:22 +0000 |
commit | 408c926802e5599ece58a2e5169be37fe4696ff3 (patch) | |
tree | adee396e75b7c192f91667a06ec97f4294a76d1e /cookie.c | |
parent | add LiveHTTPHeaders-like option: -reqlog. (diff) | |
download | w3m-408c926802e5599ece58a2e5169be37fe4696ff3.tar.gz w3m-408c926802e5599ece58a2e5169be37fe4696ff3.zip |
accept invalid "set-cookies" headers when "domainName == .hostName".
Diffstat (limited to 'cookie.c')
-rw-r--r-- | cookie.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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); |