UI, file-updater, rtmp-services: Enable curl ALPN support

In the years since this code was added, ALPN is now widely supported,
and NPN is being removed entirely in the latest version of nginx. It's
time to start using ALPN!
master
Richard Stanway 2022-01-17 20:02:54 +01:00 committed by Jim
parent 8d15aea69d
commit 85addc3dac
5 changed files with 0 additions and 28 deletions

View File

@ -77,11 +77,6 @@ void RemoteTextThread::run()
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);
#endif
if (!postData.empty()) {
curl_easy_setopt(curl.get(), CURLOPT_POSTFIELDS,
postData.c_str());
@ -177,10 +172,6 @@ bool GetRemoteFile(const char *url, std::string &str, std::string &error,
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);
#endif
if (!request_type.empty()) {
if (request_type != "GET")
curl_easy_setopt(curl.get(),

View File

@ -127,11 +127,6 @@ static bool do_http_request(struct update_info *info, const char *url,
curl_easy_setopt(info->curl, CURLOPT_HEADERDATA, info);
}
#if LIBCURL_VERSION_NUM >= 0x072400
// A lot of servers don't yet support ALPN
curl_easy_setopt(info->curl, CURLOPT_SSL_ENABLE_ALPN, 0);
#endif
code = curl_easy_perform(info->curl);
if (code != CURLE_OK) {
warn("Remote update of URL \"%s\" failed: %s", url,

View File

@ -94,11 +94,6 @@ const char *nimotv_get_ingest(const char *key)
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
curl_obs_set_revoke_setting(curl_handle);
#if LIBCURL_VERSION_NUM >= 0x072400
// A lot of servers don't yet support ALPN
curl_easy_setopt(curl_handle, CURLOPT_SSL_ENABLE_ALPN, 0);
#endif
res = curl_easy_perform(curl_handle);
dstr_free(&uri);

View File

@ -125,10 +125,6 @@ struct showroom_ingest *showroom_get_ingest(const char *server,
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&json);
curl_obs_set_revoke_setting(curl_handle);
#if LIBCURL_VERSION_NUM >= 0x072400
curl_easy_setopt(curl_handle, CURLOPT_SSL_ENABLE_ALPN, 0);
#endif
res = curl_easy_perform(curl_handle);
dstr_free(&uri);
if (res != CURLE_OK) {

View File

@ -65,11 +65,6 @@ const char *younow_get_ingest(const char *server, const char *key)
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
curl_obs_set_revoke_setting(curl_handle);
#if LIBCURL_VERSION_NUM >= 0x072400
// A lot of servers don't yet support ALPN
curl_easy_setopt(curl_handle, CURLOPT_SSL_ENABLE_ALPN, 0);
#endif
res = curl_easy_perform(curl_handle);
dstr_free(&uri);