diff options
| author | zousar <[email protected]> | 2025-09-19 23:46:52 -0600 |
|---|---|---|
| committer | zousar <[email protected]> | 2025-09-19 23:46:52 -0600 |
| commit | 7a94b22eafdbd3f394fb9200e713cbb3b2b0cd56 (patch) | |
| tree | 2ff8345484208d100000d8be805ff8f13dd2e7cc /src/zenserver/cache/httpstructuredcache.cpp | |
| parent | fix quoted wildcard options (#500) (diff) | |
| download | zen-7a94b22eafdbd3f394fb9200e713cbb3b2b0cd56.tar.xz zen-7a94b22eafdbd3f394fb9200e713cbb3b2b0cd56.zip | |
Change batch put responses for client reporting
Conflicts are now treated as successes, and we optionally return a Details array instead of an ErrorMessages array. Details are returned for all requests in a batch, or no requests in a batch depending on whether there are any details to be shared about any of the put requests. The details for a conflict include the raw hash and raw size of the item. If the item is a record, we also include the record as an object.
Diffstat (limited to 'src/zenserver/cache/httpstructuredcache.cpp')
| -rw-r--r-- | src/zenserver/cache/httpstructuredcache.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/zenserver/cache/httpstructuredcache.cpp b/src/zenserver/cache/httpstructuredcache.cpp index c83065506..dc14465de 100644 --- a/src/zenserver/cache/httpstructuredcache.cpp +++ b/src/zenserver/cache/httpstructuredcache.cpp @@ -1221,8 +1221,11 @@ HttpStructuredCacheService::HandlePutCacheRecord(HttpServerRequest& Request, con break; } - return PutResult.Message.empty() ? Request.WriteResponse(ResponseCode) - : Request.WriteResponse(ResponseCode, zen::HttpContentType::kText, PutResult.Message); + if (PutResult.Details) + { + Request.WriteResponse(ResponseCode, PutResult.Details); + } + return Request.WriteResponse(ResponseCode); }; const HttpContentType ContentType = Request.RequestContentType(); |