From 2012683996386756c95a6e739da3db26132ed738 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 28 Jan 2022 13:29:55 +0100 Subject: Structured cache PUTs now preserve content type for binary and compressed binary --- zenserver/cache/structuredcache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zenserver/cache/structuredcache.cpp') 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); -- cgit v1.2.3