diff options
-rw-r--r-- | pacredir.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -228,7 +228,9 @@ static void * get_http_code(void * data) { if ((curl = curl_easy_init()) != NULL) { curl_easy_setopt(curl, CURLOPT_URL, request->url); - /* example.com is redirected, so we tell libcurl to follow redirection */ + /* darkhttpd only serves IPv4, so limit curl to that */ + curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + /* tell libcurl to follow redirection */ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); /* set user agent */ curl_easy_setopt(curl, CURLOPT_USERAGENT, "pacredir/" VERSION " (" ARCH ")"); |