diff options
| author | Dan Engelbrecht <[email protected]> | 2022-05-31 00:35:07 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-05-31 00:35:07 +0200 |
| commit | 0d084503c7fa0481b8c7656e106db58f9b9d7cf5 (patch) | |
| tree | ed96f7279e6e64578df5c8dd5a00a20d878f1f68 /zenserver/upstream/zen.cpp | |
| parent | Merge pull request #112 from EpicGames/de/fix-cache-overwrite-when-open (diff) | |
| parent | remove unused parameter (diff) | |
| download | zen-0d084503c7fa0481b8c7656e106db58f9b9d7cf5.tar.xz zen-0d084503c7fa0481b8c7656e106db58f9b9d7cf5.zip | |
Merge pull request #114 from EpicGames/de/fix-legacy-upstream-without-namespace-support
Remove namespace from HTTP URI style request in upstream
Diffstat (limited to 'zenserver/upstream/zen.cpp')
| -rw-r--r-- | zenserver/upstream/zen.cpp | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/zenserver/upstream/zen.cpp b/zenserver/upstream/zen.cpp index efc75b5b4..8fc1503c7 100644 --- a/zenserver/upstream/zen.cpp +++ b/zenserver/upstream/zen.cpp @@ -408,14 +408,15 @@ ZenStructuredCacheSession::CheckHealth() } ZenCacheResult -ZenStructuredCacheSession::GetCacheRecord(std::string_view Namespace, std::string_view BucketId, const IoHash& Key, ZenContentType Type) +ZenStructuredCacheSession::GetCacheRecord(std::string_view, std::string_view BucketId, const IoHash& Key, ZenContentType Type) { ExtendableStringBuilder<256> Uri; Uri << m_Client.ServiceUrl() << "/z$/"; - if (Namespace != ZenCacheStore::DefaultNamespace) - { - Uri << Namespace << "/"; - } + // TODO: DE20220530: Disable adding namespace into URL until we have updated the shared instances with namespace support + // if (Namespace != ZenCacheStore::DefaultNamespace) + // { + // Uri << Namespace << "/"; + // } Uri << BucketId << "/" << Key.ToHexString(); cpr::Session& Session = m_SessionState->GetSession(); @@ -437,17 +438,15 @@ ZenStructuredCacheSession::GetCacheRecord(std::string_view Namespace, std::strin } ZenCacheResult -ZenStructuredCacheSession::GetCacheValue(std::string_view Namespace, - std::string_view BucketId, - const IoHash& Key, - const IoHash& ValueContentId) +ZenStructuredCacheSession::GetCacheValue(std::string_view, std::string_view BucketId, const IoHash& Key, const IoHash& ValueContentId) { ExtendableStringBuilder<256> Uri; Uri << m_Client.ServiceUrl() << "/z$/"; - if (Namespace != ZenCacheStore::DefaultNamespace) - { - Uri << Namespace << "/"; - } + // TODO: DE20220530: Disable adding namespace into URL until we have updated the shared instances with namespace support + // if (Namespace != ZenCacheStore::DefaultNamespace) + // { + // Uri << Namespace << "/"; + // } Uri << BucketId << "/" << Key.ToHexString() << "/" << ValueContentId.ToHexString(); cpr::Session& Session = m_SessionState->GetSession(); @@ -470,7 +469,7 @@ ZenStructuredCacheSession::GetCacheValue(std::string_view Namespace, } ZenCacheResult -ZenStructuredCacheSession::PutCacheRecord(std::string_view Namespace, +ZenStructuredCacheSession::PutCacheRecord(std::string_view, std::string_view BucketId, const IoHash& Key, IoBuffer Value, @@ -478,10 +477,11 @@ ZenStructuredCacheSession::PutCacheRecord(std::string_view Namespace, { ExtendableStringBuilder<256> Uri; Uri << m_Client.ServiceUrl() << "/z$/"; - if (Namespace != ZenCacheStore::DefaultNamespace) - { - Uri << Namespace << "/"; - } + // TODO: DE20220530: Disable adding namespace into URL until we have updated the shared instances with namespace support + // if (Namespace != ZenCacheStore::DefaultNamespace) + // { + // Uri << Namespace << "/"; + // } Uri << BucketId << "/" << Key.ToHexString(); cpr::Session& Session = m_SessionState->GetSession(); @@ -507,7 +507,7 @@ ZenStructuredCacheSession::PutCacheRecord(std::string_view Namespace, } ZenCacheResult -ZenStructuredCacheSession::PutCacheValue(std::string_view Namespace, +ZenStructuredCacheSession::PutCacheValue(std::string_view, std::string_view BucketId, const IoHash& Key, const IoHash& ValueContentId, @@ -515,10 +515,11 @@ ZenStructuredCacheSession::PutCacheValue(std::string_view Namespace, { ExtendableStringBuilder<256> Uri; Uri << m_Client.ServiceUrl() << "/z$/"; - if (Namespace != ZenCacheStore::DefaultNamespace) - { - Uri << Namespace << "/"; - } + // TODO: DE20220530: Disable adding namespace into URL until we have updated the shared instances with namespace support + // if (Namespace != ZenCacheStore::DefaultNamespace) + // { + // Uri << Namespace << "/"; + // } Uri << BucketId << "/" << Key.ToHexString() << "/" << ValueContentId.ToHexString(); cpr::Session& Session = m_SessionState->GetSession(); |