New upstream version 23.2.1+dfsg1
This commit is contained in:
parent
cdc9a9fc87
commit
b14f9eae6d
1017 changed files with 37232 additions and 11111 deletions
|
|
@ -61,7 +61,11 @@ void RemoteTextThread::run()
|
|||
contentTypeString.c_str());
|
||||
}
|
||||
|
||||
for (std::string &h : extraHeaders)
|
||||
header = curl_slist_append(header, h.c_str());
|
||||
|
||||
curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str());
|
||||
curl_easy_setopt(curl.get(), CURLOPT_ACCEPT_ENCODING, "");
|
||||
curl_easy_setopt(curl.get(), CURLOPT_HTTPHEADER,
|
||||
header);
|
||||
curl_easy_setopt(curl.get(), CURLOPT_ERRORBUFFER,
|
||||
|
|
@ -71,6 +75,10 @@ void RemoteTextThread::run()
|
|||
curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA,
|
||||
&str);
|
||||
|
||||
if (timeoutSec)
|
||||
curl_easy_setopt(curl.get(), CURLOPT_TIMEOUT,
|
||||
timeoutSec);
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x072400
|
||||
// A lot of servers don't yet support ALPN
|
||||
curl_easy_setopt(curl.get(), CURLOPT_SSL_ENABLE_ALPN, 0);
|
||||
|
|
@ -118,7 +126,8 @@ bool GetRemoteFile(
|
|||
const char *contentType,
|
||||
const char *postData,
|
||||
std::vector<std::string> extraHeaders,
|
||||
std::string *signature)
|
||||
std::string *signature,
|
||||
int timeoutSec)
|
||||
{
|
||||
vector<string> header_in_list;
|
||||
char error_in[CURL_ERROR_SIZE];
|
||||
|
|
@ -151,6 +160,7 @@ bool GetRemoteFile(
|
|||
header = curl_slist_append(header, h.c_str());
|
||||
|
||||
curl_easy_setopt(curl.get(), CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl.get(), CURLOPT_ACCEPT_ENCODING, "");
|
||||
curl_easy_setopt(curl.get(), CURLOPT_HTTPHEADER,
|
||||
header);
|
||||
curl_easy_setopt(curl.get(), CURLOPT_ERRORBUFFER,
|
||||
|
|
@ -166,6 +176,10 @@ bool GetRemoteFile(
|
|||
&header_in_list);
|
||||
}
|
||||
|
||||
if (timeoutSec)
|
||||
curl_easy_setopt(curl.get(), CURLOPT_TIMEOUT,
|
||||
timeoutSec);
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x072400
|
||||
// A lot of servers don't yet support ALPN
|
||||
curl_easy_setopt(curl.get(), CURLOPT_SSL_ENABLE_ALPN, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue