Skip to content

Commit 0d70804

Browse files
ecclesia-robotcopybara-github
authored andcommitted
Bug fix in setting CURLOPT_NOPROGRESS
PiperOrigin-RevId: 615190048
1 parent 1d74e28 commit 0d70804

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ecclesia/lib/http/curl_client.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ CURLcode LibCurlProxy::curl_easy_setopt(CURL *curl, CURLoption option,
139139
}
140140

141141
CURLcode LibCurlProxy::curl_easy_setopt(CURL *curl, CURLoption option,
142-
size_t (*param)(char *, size_t, size_t,
143-
void *)) {
142+
size_t (*param)(char *, size_t, size_t,
143+
void *)) {
144144
return ::curl_easy_setopt(curl, option, param);
145145
}
146146

@@ -403,7 +403,8 @@ absl::StatusOr<CurlHttpClient::HttpResponse> CurlHttpClient::HttpMethod(
403403
libcurl_->curl_easy_setopt(curl, CURLOPT_WRITEHEADER, &context);
404404

405405
if (handler != nullptr) {
406-
libcurl_->curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
406+
libcurl_->curl_easy_setopt(curl, CURLOPT_NOPROGRESS,
407+
static_cast<uint64_t>(0L));
407408
libcurl_->curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION,
408409
ProgressCallback);
409410
libcurl_->curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &context);

0 commit comments

Comments
 (0)