From f4fce2fd2e81039b247b2fee90a69a98490742ca Mon Sep 17 00:00:00 2001 From: X512 Date: Wed, 8 Apr 2020 10:01:34 +0900 Subject: [PATCH] HttpRequest: use off_t for reply content size Fixes #15850. Change-Id: Ic5d64ecba92306cbe798c94ac8e4a7626125e09b Reviewed-on: https://review.haiku-os.org/c/haiku/+/2464 Reviewed-by: Adrien Destugues --- src/kits/network/libnetapi/HttpRequest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kits/network/libnetapi/HttpRequest.cpp b/src/kits/network/libnetapi/HttpRequest.cpp index c74624ec8e..6a705b64fd 100644 --- a/src/kits/network/libnetapi/HttpRequest.cpp +++ b/src/kits/network/libnetapi/HttpRequest.cpp @@ -570,8 +570,8 @@ BHttpRequest::_MakeRequest() bool decompress = false; status_t readError = B_OK; ssize_t bytesRead = 0; - ssize_t bytesReceived = 0; - ssize_t bytesTotal = 0; + off_t bytesReceived = 0; + off_t bytesTotal = 0; size_t previousBufferSize = 0; off_t bytesUnpacked = 0; char* inputTempBuffer = new(std::nothrow) char[kHttpBufferSize]; @@ -649,7 +649,7 @@ BHttpRequest::_MakeRequest() int32 index = fHeaders.HasHeader("Content-Length"); if (index != B_ERROR) - bytesTotal = atoi(fHeaders.HeaderAt(index).Value()); + bytesTotal = atoll(fHeaders.HeaderAt(index).Value()); else bytesTotal = -1; }