From 7015b399c63af55f00ec32f97137e7fba9b98f2d Mon Sep 17 00:00:00 2001 From: L-Super <40905056+L-Super@users.noreply.github.com> Date: Mon, 26 Aug 2024 12:55:25 +0800 Subject: [PATCH] fix: incorrect words in session.cpp --- cpr/session.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpr/session.cpp b/cpr/session.cpp index c015cc067..b2263ec4b 100644 --- a/cpr/session.cpp +++ b/cpr/session.cpp @@ -650,7 +650,7 @@ void Session::SetAcceptEncoding(AcceptEncoding&& accept_encoding) { } cpr_off_t Session::GetDownloadFileLength() { - cpr_off_t downloadFileLenth = -1; + cpr_off_t downloadFileLength = -1; curl_easy_setopt(curl_->handle, CURLOPT_URL, url_.c_str()); const std::string protocol = url_.str().substr(0, url_.str().find(':')); @@ -669,10 +669,10 @@ cpr_off_t Session::GetDownloadFileLength() { long status_code{}; curl_easy_getinfo(curl_->handle, CURLINFO_RESPONSE_CODE, &status_code); if (200 == status_code) { - curl_easy_getinfo(curl_->handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &downloadFileLenth); + curl_easy_getinfo(curl_->handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &downloadFileLength); } } - return downloadFileLenth; + return downloadFileLength; } void Session::ResponseStringReserve(size_t size) {