mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 23:30:35 -06:00
Merge branch 'ctest_submit-https' into release-3.12
Merge-request: !2171
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "cmCTestCurl.h"
|
||||
|
||||
#include "cmCTest.h"
|
||||
#include "cmCurl.h"
|
||||
#include "cmSystemTools.h"
|
||||
|
||||
#include <ostream>
|
||||
@@ -76,6 +77,7 @@ bool cmCTestCurl::InitCurl()
|
||||
if (!this->Curl) {
|
||||
return false;
|
||||
}
|
||||
cmCurlSetCAInfo(this->Curl);
|
||||
if (this->VerifyPeerOff) {
|
||||
curl_easy_setopt(this->Curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
}
|
||||
@@ -146,7 +148,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
|
||||
::curl_slist_append(nullptr, "Content-Type: text/xml");
|
||||
// Add any additional headers that the user specified.
|
||||
for (std::string const& h : this->HttpHeaders) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
" Add HTTP Header: \"" << h << "\"" << std::endl,
|
||||
this->Quiet);
|
||||
headers = ::curl_slist_append(headers, h.c_str());
|
||||
@@ -214,7 +216,7 @@ bool cmCTestCurl::HttpRequest(std::string const& url,
|
||||
struct curl_slist* headers = nullptr;
|
||||
if (!this->HttpHeaders.empty()) {
|
||||
for (std::string const& h : this->HttpHeaders) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
" Add HTTP Header: \"" << h << "\"" << std::endl,
|
||||
this->Quiet);
|
||||
headers = ::curl_slist_append(headers, h.c_str());
|
||||
|
||||
@@ -314,7 +314,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
|
||||
// Add any additional headers that the user specified.
|
||||
for (std::string const& h : this->HttpHeaders) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
" Add HTTP Header: \"" << h << "\"" << std::endl,
|
||||
this->Quiet);
|
||||
headers = ::curl_slist_append(headers, h.c_str());
|
||||
|
||||
Reference in New Issue
Block a user