(self, cookie, request)
| 1160 | return True |
| 1161 | |
| 1162 | def return_ok_domain(self, cookie, request): |
| 1163 | req_host, erhn = eff_request_host(request) |
| 1164 | domain = cookie.domain |
| 1165 | |
| 1166 | if domain and not domain.startswith("."): |
| 1167 | dotdomain = "." + domain |
| 1168 | else: |
| 1169 | dotdomain = domain |
| 1170 | |
| 1171 | # strict check of non-domain cookies: Mozilla does this, MSIE5 doesn't |
| 1172 | if (cookie.version == 0 and |
| 1173 | (self.strict_ns_domain & self.DomainStrictNonDomain) and |
| 1174 | not cookie.domain_specified and domain != erhn): |
| 1175 | _debug(" cookie with unspecified domain does not string-compare " |
| 1176 | "equal to request domain") |
| 1177 | return False |
| 1178 | |
| 1179 | if cookie.version > 0 and not domain_match(erhn, domain): |
| 1180 | _debug(" effective request-host name %s does not domain-match " |
| 1181 | "RFC 2965 cookie domain %s", erhn, domain) |
| 1182 | return False |
| 1183 | if cookie.version == 0 and not ("."+erhn).endswith(dotdomain): |
| 1184 | _debug(" request-host %s does not match Netscape cookie domain " |
| 1185 | "%s", req_host, domain) |
| 1186 | return False |
| 1187 | return True |
| 1188 | |
| 1189 | def domain_return_ok(self, domain, request): |
| 1190 | # Liberal check of. This is here as an optimization to avoid |
nothing calls this directly
no test coverage detected