MCPcopy Index your code
hub / github.com/python/cpython / return_ok

Method return_ok

Lib/http/cookiejar.py:1097–1113  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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:

Callers 1

test_domain_blockMethod · 0.95

Calls 2

_debugFunction · 0.85
fnFunction · 0.85

Tested by 1

test_domain_blockMethod · 0.76