input/curl: make proxy verify setting optional

These settings do not work if CURL was compiled with
CURL_DISABLE_PROXY, and cause error "An unknown option was passed in
to libcurl".

Fixes regression by commit 7ab0dfc8ce
This commit is contained in:
Max Kellermann 2022-11-28 15:33:10 +01:00
parent cac88e8be5
commit a8b0c55818
1 changed files with 8 additions and 2 deletions

View File

@ -439,8 +439,14 @@ CurlInputStream::InitEasy()
request->SetVerifyPeer(verify_peer);
request->SetVerifyHost(verify_host);
request->SetOption(CURLOPT_HTTPHEADER, request_headers.Get());
request->SetProxyVerifyPeer(verify_peer);
request->SetProxyVerifyHost(verify_host);
try {
request->SetProxyVerifyPeer(verify_peer);
request->SetProxyVerifyHost(verify_host);
} catch (...) {
/* these methods fail if libCURL was compiled with
CURL_DISABLE_PROXY; ignore silently */
}
}
void