diff options
author | Jeff Garzik <jeff@garzik.org> | 2011-03-02 22:06:25 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-03-02 22:06:25 -0500 |
commit | d4ddd315b15fe738f4d95df08a52875a8caf7943 (patch) | |
tree | f993d238ca55b4f98de8c07bb7f92e6a2f7db945 | |
parent | ef91bd59e2befdb4be7321593fe8dc8f1250080e (diff) |
Make CURL follow redirects.
Suggested by prcarter.
-rw-r--r-- | util.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |