diff options
| author | Stefan Boberg <[email protected]> | 2022-01-28 13:29:55 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2022-01-28 13:29:55 +0100 |
| commit | 2012683996386756c95a6e739da3db26132ed738 (patch) | |
| tree | 1697a41f77118b4a1cad362f8a0b00b017732eda /zenserver/cache/structuredcache.cpp | |
| parent | Merge branch 'main' of https://github.com/EpicGames/zen (diff) | |
| download | zen-2012683996386756c95a6e739da3db26132ed738.tar.xz zen-2012683996386756c95a6e739da3db26132ed738.zip | |
Structured cache PUTs now preserve content type for binary and compressed binary
Diffstat (limited to 'zenserver/cache/structuredcache.cpp')
| -rw-r--r-- | zenserver/cache/structuredcache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zenserver/cache/structuredcache.cpp b/zenserver/cache/structuredcache.cpp index 8854ff3d1..72eabb053 100644 --- a/zenserver/cache/structuredcache.cpp +++ b/zenserver/cache/structuredcache.cpp @@ -417,14 +417,14 @@ HttpStructuredCacheService::HandlePutCacheRecord(zen::HttpServerRequest& Request Body.SetContentType(ContentType); - if (ContentType == HttpContentType::kBinary) + if (ContentType == HttpContentType::kBinary || ContentType == HttpContentType::kCompressedBinary) { ZEN_DEBUG("PUT - '{}/{}' {} '{}'", Ref.BucketSegment, Ref.HashKey, NiceBytes(Body.Size()), ToString(ContentType)); m_CacheStore.Put(Ref.BucketSegment, Ref.HashKey, {.Value = Body}); if (EnumHasAllFlags(PolicyFromURL, CachePolicy::StoreRemote)) { - m_UpstreamCache.EnqueueUpstream({.Type = ZenContentType::kBinary, .Key = {Ref.BucketSegment, Ref.HashKey}}); + m_UpstreamCache.EnqueueUpstream({.Type = ContentType, .Key = {Ref.BucketSegment, Ref.HashKey}}); } Request.WriteResponse(HttpResponseCode::Created); |