MCPcopy Create free account
hub / github.com/psf/cachecontrol / etag

Method etag

tests/conftest.py:64–71  ·  view source on GitHub ↗
(self, env, start_response)

Source from the content-addressed store, hash-verified

62 return start_response("304 Not Modified", [])
63
64 def etag(self, env, start_response):
65 headers = [("Etag", self.etag_string)]
66 if env.get("HTTP_IF_NONE_MATCH") == self.etag_string:
67 start_response("304 Not Modified", headers)
68 return []
69 else:
70 start_response("200 OK", headers)
71 return [pformat(env).encode("utf8")]
72
73 def cache_60(self, env, start_response):
74 headers = [("Cache-Control", "public, max-age=60")]

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected