From fecd8a5cf9fb298ba5785b5921d6d44e85a3cea1 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 5 Nov 2021 14:04:42 -0400 Subject: [PATCH] Disable threaded-resolver and pthreads in cURL. Enable verbose. --- dep/Makefile | 2 +- src/network.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dep/Makefile b/dep/Makefile index f0ab8231..98f52f5b 100755 --- a/dep/Makefile +++ b/dep/Makefile @@ -131,7 +131,7 @@ curl-7.79.1: rm curl-7.79.1.tar.gz CURL_FLAGS += --enable-symbol-hiding --enable-shared=no -CURL_FLAGS += --enable-http --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --enable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-mqtt --disable-manual --enable-threaded-resolver --enable-pthreads --disable-verbose --disable-sspi --disable-ntlm --disable-ntlm-wb --disable-tls-srp --disable-unix-sockets --disable-doh --disable-mime --disable-dateparse --disable-netrc --disable-progress-meter --disable-alt-svc +CURL_FLAGS += --enable-http --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --enable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-mqtt --disable-manual --disable-threaded-resolver --disable-pthreads --enable-verbose --disable-sspi --disable-ntlm --disable-ntlm-wb --disable-tls-srp --disable-unix-sockets --disable-doh --disable-mime --disable-dateparse --disable-netrc --disable-progress-meter --disable-alt-svc CURL_FLAGS += --without-hyper --without-zlib --without-brotli --without-zstd --without-libpsl --without-libgsasl --without-libssh2 --without-librtmp --without-winidn --without-libidn2 --without-nghttp2 --without-ngtcp2 --without-nghttp3 --without-quiche CURL_FLAGS += --with-ssl="$(DEP_PATH)" diff --git a/src/network.cpp b/src/network.cpp index 0fcbf24f..cda57aea 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -22,7 +22,7 @@ static CURL* createCurl() { CURL* curl = curl_easy_init(); assert(curl); - // curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); + curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true); // 15 second timeout for requests curl_easy_setopt(curl, CURLOPT_TIMEOUT, 15); @@ -214,7 +214,7 @@ bool requestDownload(const std::string& url, const std::string& filename, float* std::string encodeUrl(const std::string& s) { - CURL* curl = curl_easy_init(); + CURL* curl = createCurl(); DEFER({curl_easy_cleanup(curl);}); assert(curl); char* escaped = curl_easy_escape(curl, s.c_str(), s.size());