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

Method set_ok

Lib/http/cookiejar.py:950–967  ·  view source on GitHub ↗

If you override .set_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 accept).

(self, cookie, request)

Source from the content-addressed store, hash-verified

948 return True
949
950 def set_ok(self, cookie, request):
951 """
952 If you override .set_ok(), be sure to call this method. If it returns
953 false, so should your subclass (assuming your subclass wants to be more
954 strict about which cookies to accept).
955
956 """
957 _debug(" - checking cookie %s=%s", cookie.name, cookie.value)
958
959 assert cookie.name is not None
960
961 for n in "version", "verifiability", "name", "path", "domain", "port":
962 fn_name = "set_ok_"+n
963 fn = getattr(self, fn_name)
964 if not fn(cookie, request):
965 return False
966
967 return True
968
969 def set_ok_version(self, cookie, request):
970 if cookie.version is None:

Callers

nothing calls this directly

Calls 2

_debugFunction · 0.85
fnFunction · 0.85

Tested by

no test coverage detected