| 967 | return True |
| 968 | |
| 969 | def set_ok_version(self, cookie, request): |
| 970 | if cookie.version is None: |
| 971 | # Version is always set to 0 by parse_ns_headers if it's a Netscape |
| 972 | # cookie, so this must be an invalid RFC 2965 cookie. |
| 973 | _debug(" Set-Cookie2 without version attribute (%s=%s)", |
| 974 | cookie.name, cookie.value) |
| 975 | return False |
| 976 | if cookie.version > 0 and not self.rfc2965: |
| 977 | _debug(" RFC 2965 cookies are switched off") |
| 978 | return False |
| 979 | elif cookie.version == 0 and not self.netscape: |
| 980 | _debug(" Netscape cookies are switched off") |
| 981 | return False |
| 982 | return True |
| 983 | |
| 984 | def set_ok_verifiability(self, cookie, request): |
| 985 | if request.unverifiable and is_third_party(request): |