diff options
| author | Stefan Boberg <[email protected]> | 2021-09-13 10:07:30 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-13 10:07:30 +0200 |
| commit | 1d6aeff046a8f9f3df564163b56e927096decc39 (patch) | |
| tree | 368dcb95585fbef37314b9a05d7e77d95a76e844 /zenserver/cache/structuredcache.cpp | |
| parent | Added CbPackageOffer content type (diff) | |
| download | zen-1d6aeff046a8f9f3df564163b56e927096decc39.tar.xz zen-1d6aeff046a8f9f3df564163b56e927096decc39.zip | |
Implemented generic CbPackage attachments filtering
Package transmission will also need to be updated (up next) for the new scheme to be effective
Diffstat (limited to 'zenserver/cache/structuredcache.cpp')
| -rw-r--r-- | zenserver/cache/structuredcache.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/zenserver/cache/structuredcache.cpp b/zenserver/cache/structuredcache.cpp index 77cae2d99..b2f8d191c 100644 --- a/zenserver/cache/structuredcache.cpp +++ b/zenserver/cache/structuredcache.cpp @@ -25,27 +25,6 @@ namespace zen { using namespace std::literals; -zen::HttpContentType -MapToHttpContentType(zen::ZenContentType Type) -{ - switch (Type) - { - default: - case zen::ZenContentType::kBinary: - return zen::HttpContentType::kBinary; - case zen::ZenContentType::kCbObject: - return zen::HttpContentType::kCbObject; - case zen::ZenContentType::kCbPackage: - return zen::HttpContentType::kCbPackage; - case zen::ZenContentType::kText: - return zen::HttpContentType::kText; - case zen::ZenContentType::kJSON: - return zen::HttpContentType::kJSON; - case zen::ZenContentType::kYAML: - return zen::HttpContentType::kYAML; - } -}; - ////////////////////////////////////////////////////////////////////////// HttpStructuredCacheService::HttpStructuredCacheService(::ZenCacheStore& InCacheStore, @@ -224,7 +203,7 @@ HttpStructuredCacheService::HandleCacheRecordRequest(zen::HttpServerRequest& Req Value.Value.GetContentType(), InUpstreamCache ? "upstream" : "local"); - return Request.WriteResponse(zen::HttpResponseCode::OK, MapToHttpContentType(Value.Value.GetContentType()), Value.Value); + return Request.WriteResponse(zen::HttpResponseCode::OK, Value.Value.GetContentType(), Value.Value); } break; |