MCPcopy Index your code
hub / github.com/RustPython/RustPython / _cookies_for_domain

Method _cookies_for_domain

Lib/http/cookiejar.py:1273–1289  ·  view source on GitHub ↗
(self, domain, request)

Source from the content-addressed store, hash-verified

1271 self._policy = policy
1272
1273 def _cookies_for_domain(self, domain, request):
1274 cookies = []
1275 if not self._policy.domain_return_ok(domain, request):
1276 return []
1277 _debug("Checking %s for cookies to return", domain)
1278 cookies_by_path = self._cookies[domain]
1279 for path in cookies_by_path.keys():
1280 if not self._policy.path_return_ok(path, request):
1281 continue
1282 cookies_by_name = cookies_by_path[path]
1283 for cookie in cookies_by_name.values():
1284 if not self._policy.return_ok(cookie, request):
1285 _debug(" not returning cookie")
1286 continue
1287 _debug(" it's a match")
1288 cookies.append(cookie)
1289 return cookies
1290
1291 def _cookies_for_request(self, request):
1292 """Return a list of cookies to be returned to server."""

Callers 1

_cookies_for_requestMethod · 0.95

Calls 7

_debugFunction · 0.85
domain_return_okMethod · 0.45
keysMethod · 0.45
path_return_okMethod · 0.45
valuesMethod · 0.45
return_okMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected