Commit 655ba6a6 authored by Max Kellermann's avatar Max Kellermann

input_curl: follow HTTP redirects

Follow HTTP redirects, but no more than 5.
parent 422c17ce
......@@ -469,6 +469,8 @@ input_curl_easy_init(struct input_stream *is)
input_curl_writefunction);
curl_easy_setopt(c->easy, CURLOPT_WRITEDATA, is);
curl_easy_setopt(c->easy, CURLOPT_HTTP200ALIASES, http_200_aliases);
curl_easy_setopt(c->easy, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(c->easy, CURLOPT_MAXREDIRS, 5);
curl_easy_setopt(c->easy, CURLOPT_FAILONERROR, true);
curl_easy_setopt(c->easy, CURLOPT_ERRORBUFFER, c->error);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment