mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Revert "file: Allow DOWNLOAD/UPLOAD using alternate authentication methods"
Revert commit 31301b46a7 (file: Allow DOWNLOAD/UPLOAD using alternate
authentication methods, 2018-08-28, v3.13.0-rc1~155^2). It regressed
support for password-protected redirects.
Fixes: #18691
This commit is contained in:
@@ -2906,10 +2906,6 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
check_curl_result(res, "DOWNLOAD cannot set url: ");
|
||||
|
||||
// enable auth
|
||||
res = ::curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
||||
check_curl_result(res, "DOWNLOAD cannot set httpauth: ");
|
||||
|
||||
// enable HTTP ERROR parsing
|
||||
res = ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
|
||||
check_curl_result(res, "DOWNLOAD cannot set http failure option: ");
|
||||
@@ -3209,10 +3205,6 @@ bool cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
||||
res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
check_curl_result(res, "UPLOAD cannot set url: ");
|
||||
|
||||
// enable auth
|
||||
res = ::curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
||||
check_curl_result(res, "UPLOAD cannot set httpauth: ");
|
||||
|
||||
res =
|
||||
::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cmWriteToMemoryCallback);
|
||||
check_curl_result(res, "UPLOAD cannot set write function: ");
|
||||
|
||||
Reference in New Issue
Block a user