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

Method fixed_length

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

Source from the content-addressed store, hash-verified

102 yield pformat(i).encode("utf8")
103
104 def fixed_length(self, env, start_response):
105 body = b"0123456789"
106 headers = [
107 ("Content-Type", "text/plain"),
108 ("Cache-Control", "max-age=5000"),
109 ("Content-Length", str(len(body))),
110 ]
111 start_response("200 OK", headers)
112 return [body]
113
114 def __call__(self, env, start_response):
115 func = self.dispatch(env)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected