diff options
| author | zousar <[email protected]> | 2022-09-09 10:17:52 -0600 |
|---|---|---|
| committer | zousar <[email protected]> | 2022-09-09 10:17:52 -0600 |
| commit | cdfcaaf618716fbab861a21a9d8692e8a048da8c (patch) | |
| tree | 29c97818ae144526d0282f6d00ef9ba2dee85887 | |
| parent | 0.1.5 (diff) | |
| parent | only try to parse payload hash if header exists (#163) (diff) | |
| download | zen-0.1.6-pre0.tar.xz zen-0.1.6-pre0.zip | |
Merge branch 'main' of https://github.com/EpicGames/zenv0.1.6-pre5v0.1.6-pre3v0.1.6-pre2v0.1.6-pre1v0.1.6-pre0v0.1.5
| -rw-r--r-- | CHANGELOG.md | 3 | ||||
| -rw-r--r-- | zenserver/upstream/jupiter.cpp | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index ee7d6d5f5..352b1e894 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ ## +- Bugfix: Don't fail entire request if GetCacheValue from Horde fails for a single value + +## v0.1.4 - Change: Bumped ZEN_SCHEMA_VERSION - this will invalidate entire local cache when deployed - Change: Make CAS storage an hidden implementation detail of CidStore, we no longer hash and do mapping to compressed hash when storing cache values - Feature: Extended zen print command to also handle CbPackage and CompressedBuffer format payloads diff --git a/zenserver/upstream/jupiter.cpp b/zenserver/upstream/jupiter.cpp index b82290f3d..260b83355 100644 --- a/zenserver/upstream/jupiter.cpp +++ b/zenserver/upstream/jupiter.cpp @@ -209,7 +209,14 @@ CloudCacheSession::GetInlineBlob(std::string_view Namespace, std::string_view Bu const bool Success = Response.status_code == 200; const IoBuffer Buffer = Success ? IoBufferBuilder::MakeCloneFromMemory(Response.text.data(), Response.text.size()) : IoBuffer(); - OutPayloadHash = IoHash::FromHexString(Response.header["X-Jupiter-InlinePayloadHash"]); + if (auto It = Response.header.find("X-Jupiter-InlinePayloadHash"); It != Response.header.end()) + { + const std::string& PayloadHashHeader = It->second; + if (PayloadHashHeader.length() == IoHash::StringLength) + { + OutPayloadHash = IoHash::FromHexString(PayloadHashHeader); + } + } return {.Response = Buffer, .Bytes = Response.downloaded_bytes, .ElapsedSeconds = Response.elapsed, .Success = Success}; } |