From 9b82209e3368de806a48554d85cb7c364973eb2d Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 21 Mar 2024 10:58:28 +0100 Subject: add support for responding with partial cache chunks (#11) * add support for responding with partial cache chunks --- src/zenutil/cache/cacherequests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/zenutil/cache/cacherequests.cpp') diff --git a/src/zenutil/cache/cacherequests.cpp b/src/zenutil/cache/cacherequests.cpp index f4de6bacd..442cf0dfc 100644 --- a/src/zenutil/cache/cacherequests.cpp +++ b/src/zenutil/cache/cacherequests.cpp @@ -792,8 +792,9 @@ namespace cacherequests { bool Succeeded = !RawHashField.HasError(); if (Succeeded) { + ValueResult.RawOffset = RecordObject["RawOffset"].AsUInt64(0); const CbAttachment* Attachment = Package.FindAttachment(ValueResult.RawHash); - ValueResult.Body = Attachment ? Attachment->AsCompressedBinary() : CompressedBuffer(); + ValueResult.Body = Attachment ? Attachment->AsCompressedBinary().MakeOwned() : CompressedBuffer(); if (ValueResult.Body) { ValueResult.RawSize = ValueResult.Body.DecodeRawSize(); -- cgit v1.2.3