If you override .return_ok(), be sure to call this method. If it returns false, so should your subclass (assuming your subclass wants to be more strict about which cookies to return).
(self, cookie, request)
| 1095 | return True |
| 1096 | |
| 1097 | def return_ok(self, cookie, request): |
| 1098 | """ |
| 1099 | If you override .return_ok(), be sure to call this method. If it |
| 1100 | returns false, so should your subclass (assuming your subclass wants to |
| 1101 | be more strict about which cookies to return). |
| 1102 | |
| 1103 | """ |
| 1104 | # Path has already been checked by .path_return_ok(), and domain |
| 1105 | # blocking done by .domain_return_ok(). |
| 1106 | _debug(" - checking cookie %s=%s", cookie.name, cookie.value) |
| 1107 | |
| 1108 | for n in "version", "verifiability", "secure", "expires", "port", "domain": |
| 1109 | fn_name = "return_ok_"+n |
| 1110 | fn = getattr(self, fn_name) |
| 1111 | if not fn(cookie, request): |
| 1112 | return False |
| 1113 | return True |
| 1114 | |
| 1115 | def return_ok_version(self, cookie, request): |
| 1116 | if cookie.version > 0 and not self.rfc2965: |