aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpclient.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-04-10 20:07:49 +0200
committerGitHub Enterprise <[email protected]>2025-04-10 20:07:49 +0200
commit81fb756a872817c625aef2b19c6b05a77a514587 (patch)
treefe02055df361119de00416e411209ddc7adeea4b /src/zenhttp/httpclient.cpp
parentmultpart download crash (#353) (diff)
downloadzen-81fb756a872817c625aef2b19c6b05a77a514587.tar.xz
zen-81fb756a872817c625aef2b19c6b05a77a514587.zip
filesystem retry fixes (#354)
* add more forgiving retries with filesystem * fall back to FindFirstFile if access prevents us from using GetFileAttributes * only validate hash if we have a complete payload in http client * changelog
Diffstat (limited to 'src/zenhttp/httpclient.cpp')
-rw-r--r--src/zenhttp/httpclient.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/zenhttp/httpclient.cpp b/src/zenhttp/httpclient.cpp
index f3baf37ce..763f3262a 100644
--- a/src/zenhttp/httpclient.cpp
+++ b/src/zenhttp/httpclient.cpp
@@ -410,6 +410,11 @@ ValidatePayload(cpr::Response& Response, std::unique_ptr<detail::TempPayloadFile
}
}
+ if (Response.status_code == (long)HttpResponseCode::PartialContent)
+ {
+ return true;
+ }
+
if (auto JupiterHash = Response.header.find("X-Jupiter-IoHash"); JupiterHash != Response.header.end())
{
IoHash ExpectedPayloadHash;
@@ -427,11 +432,6 @@ ValidatePayload(cpr::Response& Response, std::unique_ptr<detail::TempPayloadFile
}
}
- if (Response.status_code == (long)HttpResponseCode::PartialContent)
- {
- return true;
- }
-
if (auto ContentType = Response.header.find("Content-Type"); ContentType != Response.header.end())
{
if (ContentType->second == "application/x-ue-comp")