aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-10-19 06:27:24 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-10-19 06:27:24 +0000
commit45cc78fdbc0e01d744156e853ea80de43d672f2b (patch)
treed19e6d21ad1fe2cbcd11a0f002582801acf37674
parent010044e03c349e545fdbfb612688b58a8c675839 (diff)
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...
-rw-r--r--lib/transfer.c9
1 files changed, 2 insertions, 7 deletions
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! */