From: Daniel Stenberg Date: Fri, 19 Oct 2001 06:27:24 +0000 (+0000) Subject: CURLOPT_FAILONERROR now only returns error if the HTTP code is 400 or above X-Git-Tag: curl-7_9_1~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45cc78fdbc0e01d744156e853ea80de43d672f2b;p=curl CURLOPT_FAILONERROR now only returns error if the HTTP code is 400 or above unconditionalliy. Previously, the code check was for >= 300 unless follow- location was enabled... --- diff --git a/lib/transfer.c b/lib/transfer.c index 90033a7bf..bc07aab2b 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -518,13 +518,8 @@ Transfer(struct connectdata *c_conn) data->info.httpversion = httpversion; /* 404 -> URL not found! */ - if ( - ( ((data->set.http_follow_location) && - (httpcode >= 400)) - || - (!data->set.http_follow_location && - (httpcode >= 300))) - && (data->set.http_fail_on_error)) { + if (data->set.http_fail_on_error && + (httpcode >= 400)) { /* If we have been told to fail hard on HTTP-errors, here is the check for that: */ /* serious error, go home! */