summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpoprequest.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-10-17 16:56:21 +0300
committerGitHub <noreply@github.com>2024-10-17 16:56:21 +0300
commit0ef7a9b39cf72da1211039ab22bdf8f9f6a2c984 (patch)
tree6f51ef179497265b5bff2a355471ae5dc9643ad2 /indra/llcorehttp/_httpoprequest.cpp
parent9e24b300d02e5627ea0d304d412cb683ec2de3a4 (diff)
parentd3d349ae0f17a72481f30b9354b9367b1cd3b639 (diff)
Merge pull request #2856 from secondlife/marchcat/c-develop
Develop → Maint C sync
Diffstat (limited to 'indra/llcorehttp/_httpoprequest.cpp')
-rw-r--r--indra/llcorehttp/_httpoprequest.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 5165a6eb62..6186e7a308 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -267,7 +267,7 @@ void HttpOpRequest::visitNotifier(HttpRequest * request)
if (mReplyOffset || mReplyLength)
{
// Got an explicit offset/length in response
- response->setRange(mReplyOffset, mReplyLength, mReplyFullLength);
+ response->setRange(mReplyOffset, static_cast<unsigned int>(mReplyLength), static_cast<unsigned int>(mReplyFullLength));
}
response->setContentType(mReplyConType);
response->setRetries(mPolicyRetries, mPolicy503Retries);
@@ -328,7 +328,7 @@ HttpStatus HttpOpRequest::setupGetByteRange(HttpRequest::policy_t policy_id,
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
setupCommon(policy_id, url, NULL, options, headers);
mReqMethod = HOR_GET;
- mReqOffset = offset;
+ mReqOffset = static_cast<off_t>(offset);
mReqLength = len;
if (offset || len)
{
@@ -607,7 +607,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
long data_size(0);
if (mReqBody)
{
- data_size = mReqBody->size();
+ data_size = static_cast<long>(mReqBody->size());
}
check_curl_easy_setopt(mCurlHandle, CURLOPT_POSTFIELDS, static_cast<void *>(NULL));
check_curl_easy_setopt(mCurlHandle, CURLOPT_POSTFIELDSIZE, data_size);
@@ -618,13 +618,14 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
case HOR_PATCH:
check_curl_easy_setopt(mCurlHandle, CURLOPT_CUSTOMREQUEST, "PATCH");
// fall through. The rest is the same as PUT
+ [[fallthrough]];
case HOR_PUT:
{
check_curl_easy_setopt(mCurlHandle, CURLOPT_UPLOAD, 1);
long data_size(0);
if (mReqBody)
{
- data_size = mReqBody->size();
+ data_size = static_cast<long>(mReqBody->size());
}
check_curl_easy_setopt(mCurlHandle, CURLOPT_INFILESIZE, data_size);
mCurlHeaders = curl_slist_append(mCurlHeaders, "Expect:");