Commit a8e81326 authored by Max Kellermann's avatar Max Kellermann

input_curl: enable FAILONERROR

I had this option enabled during development, but at some point, it must have gotten lost. FAILONERROR makes the curl stream fail when the server returns a status code 400 or higher. We are not interested in the server's error document.
parent 91c1a279
...@@ -452,6 +452,7 @@ input_curl_easy_init(struct input_stream *is) ...@@ -452,6 +452,7 @@ input_curl_easy_init(struct input_stream *is)
input_curl_writefunction); input_curl_writefunction);
curl_easy_setopt(c->easy, CURLOPT_WRITEDATA, is); curl_easy_setopt(c->easy, CURLOPT_WRITEDATA, is);
curl_easy_setopt(c->easy, CURLOPT_HTTP200ALIASES, http_200_aliases); curl_easy_setopt(c->easy, CURLOPT_HTTP200ALIASES, http_200_aliases);
curl_easy_setopt(c->easy, CURLOPT_FAILONERROR, true);
code = curl_easy_setopt(c->easy, CURLOPT_URL, c->url); code = curl_easy_setopt(c->easy, CURLOPT_URL, c->url);
if (code != CURLE_OK) if (code != CURLE_OK)
......
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