Skip to content

Commit

Permalink
Merge pull request #1101 from L-Super/patch-1
Browse files Browse the repository at this point in the history
fix: incorrect words in session.cpp
  • Loading branch information
COM8 authored Aug 26, 2024
2 parents aa581c9 + 7015b39 commit 3aa81a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpr/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(':'));
Expand All @@ -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) {
Expand Down

0 comments on commit 3aa81a6

Please sign in to comment.