Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/+cache_api_response_content_type.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed cache forgetting the Content-Type header of ApiResponses
1 change: 1 addition & 0 deletions pulpcore/cache/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def make_entry(self, key, base_key, handler, args, kwargs, expires=DEFAULT_EXPIR
entry["type"] = "FileResponse"
elif isinstance(response, ApiResponse):
entry["data"] = response.data
entry["content_type"] = response.content_type
entry["type"] = "APIResponse"
elif isinstance(response, HttpResponse):
entry["content"] = response.content.decode("utf-8")
Expand Down
Loading