Skip to content

Commit 0fba9f9

Browse files
Robin GeffroySergeyRyabinin
authored andcommitted
Correctly support Curl version >= 7.87.0
Since Curl 7.12.1, CURLOPT_PUT is deprecated and CURLOPT_UPLOAD should be used. A warning is issued with Curl 7.87.0 when CURLOPT_PUT is used.
1 parent 0a046e6 commit 0fba9f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,11 @@ void SetOptCodeForHttpMethod(CURL* requestHandle, const std::shared_ptr<HttpRequ
418418
}
419419
else
420420
{
421+
#if LIBCURL_VERSION_NUM >= 0x070c01 // 7.12.1
422+
curl_easy_setopt(requestHandle, CURLOPT_UPLOAD, 1L);
423+
#else
421424
curl_easy_setopt(requestHandle, CURLOPT_PUT, 1L);
425+
#endif
422426
}
423427
break;
424428
case HttpMethod::HTTP_HEAD:

0 commit comments

Comments
 (0)