From: Heng Li Date: Fri, 28 Nov 2014 16:49:11 +0000 (-0500) Subject: default to following redirect & no SSL certificate X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=32cbd58a7fc34dbeb4b0a60f18909fa13f5a31e3;p=klib.git default to following redirect & no SSL certificate --- diff --git a/kurl.c b/kurl.c index 4202d10..3bf9290 100644 --- a/kurl.c +++ b/kurl.c @@ -175,6 +175,9 @@ kurl_t *kurl_open(const char *url, kurl_opt_t *opt) curl_easy_setopt(ku->curl, CURLOPT_VERBOSE, 0L); curl_easy_setopt(ku->curl, CURLOPT_NOSIGNAL, 1L); curl_easy_setopt(ku->curl, CURLOPT_WRITEFUNCTION, write_cb); + curl_easy_setopt(ku->curl, CURLOPT_SSL_VERIFYPEER, 0L); + curl_easy_setopt(ku->curl, CURLOPT_SSL_VERIFYHOST, 0L); + curl_easy_setopt(ku->curl, CURLOPT_FOLLOWLOCATION, 1L); } ku->m_buf = KU_DEF_BUFLEN; if (!kurl_isfile(ku) && ku->m_buf < CURL_MAX_WRITE_SIZE * 2)