From d4ddd315b15fe738f4d95df08a52875a8caf7943 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Wed, 2 Mar 2011 22:06:25 -0500 Subject: [PATCH] Make CURL follow redirects. Suggested by prcarter. --- util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util.c b/util.c index 6b338471..af851eaf 100644 --- a/util.c +++ b/util.c @@ -105,6 +105,7 @@ json_t *json_rpc_call(CURL *curl, const char *url, curl_easy_setopt(curl, CURLOPT_READFUNCTION, upload_data_cb); curl_easy_setopt(curl, CURLOPT_READDATA, &upload_data); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_err_str); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); if (userpass) { curl_easy_setopt(curl, CURLOPT_USERPWD, userpass); curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);