Make libcurl return error on HTTP response >= 400

Closes: #157
Approved by: alexlarsson
auto
Denis Ollier 2018-05-27 19:48:54 +02:00 committed by Atomic Bot
parent 4e8539ccd9
commit 4bb33efbd8
1 changed files with 1 additions and 0 deletions

View File

@ -1111,6 +1111,7 @@ flatpak_create_curl_session (const char *user_agent)
return NULL;
curl_easy_setopt (curl_session, CURLOPT_CONNECTTIMEOUT, 60);
curl_easy_setopt (curl_session, CURLOPT_FAILONERROR, 1);
curl_easy_setopt (curl_session, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt (curl_session, CURLOPT_MAXREDIRS, 50);
curl_easy_setopt (curl_session, CURLOPT_NOPROGRESS, 0);