diff options
author | Christian Hesse <mail@eworm.de> | 2014-04-22 13:21:05 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2014-04-22 13:21:05 +0200 |
commit | 2790f410b553d63965b654a3248cbff51121e5e3 (patch) | |
tree | c2d4401a6112439e90be87cab117c4f219c0a4ef /pacredir.c | |
parent | 84179e44c16b73b51600dfba703dfc2c83320a2e (diff) | |
download | paccache-2790f410b553d63965b654a3248cbff51121e5e3.tar.gz paccache-2790f410b553d63965b654a3248cbff51121e5e3.tar.zst |
darkhttpd only serves IPv4, so limit curl to that
Diffstat (limited to 'pacredir.c')
-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 ")"); |