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...
This commit is contained in:
parent
010044e03c
commit
45cc78fdbc
@ -518,13 +518,8 @@ Transfer(struct connectdata *c_conn)
|
|||||||
data->info.httpversion = httpversion;
|
data->info.httpversion = httpversion;
|
||||||
|
|
||||||
/* 404 -> URL not found! */
|
/* 404 -> URL not found! */
|
||||||
if (
|
if (data->set.http_fail_on_error &&
|
||||||
( ((data->set.http_follow_location) &&
|
(httpcode >= 400)) {
|
||||||
(httpcode >= 400))
|
|
||||||
||
|
|
||||||
(!data->set.http_follow_location &&
|
|
||||||
(httpcode >= 300)))
|
|
||||||
&& (data->set.http_fail_on_error)) {
|
|
||||||
/* If we have been told to fail hard on HTTP-errors,
|
/* If we have been told to fail hard on HTTP-errors,
|
||||||
here is the check for that: */
|
here is the check for that: */
|
||||||
/* serious error, go home! */
|
/* serious error, go home! */
|
||||||
|
Loading…
Reference in New Issue
Block a user