mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-24 20:47:54 +00:00
Merge pull request #437 from yann-dubrana/main
bug #437: Fix header for caching binary responses.
This commit is contained in:
@@ -221,7 +221,8 @@ def cache(
|
||||
return response
|
||||
|
||||
result = cast(R, coder.decode_as_type(cached, type_=return_type))
|
||||
|
||||
if isinstance(result, Response):
|
||||
result.headers.update(response.headers)
|
||||
return result
|
||||
|
||||
inner.__signature__ = _augment_signature(wrapped_signature, *to_inject) # type: ignore[attr-defined]
|
||||
|
||||
Reference in New Issue
Block a user