diff --git a/cachecontrol/serialize.py b/cachecontrol/serialize.py index f0c215c..738fac7 100644 --- a/cachecontrol/serialize.py +++ b/cachecontrol/serialize.py @@ -137,6 +137,9 @@ def prepare_response(self, request, cached, body_file=None): # TypeError: 'str' does not support the buffer interface body = io.BytesIO(body_raw.encode("utf8")) + # Discard any `strict` parameter serialized by older version of cachecontrol. + cached["response"].pop("strict", None) + return HTTPResponse(body=body, preload_content=False, **cached["response"]) def _loads_v0(self, request, data, body_file=None):