]> granicus.if.org Git - curl/commitdiff
CURLOPT_FAILONERROR now only returns error if the HTTP code is 400 or above
authorDaniel Stenberg <daniel@haxx.se>
Fri, 19 Oct 2001 06:27:24 +0000 (06:27 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 19 Oct 2001 06:27:24 +0000 (06:27 +0000)
unconditionalliy. Previously, the code check was for >= 300 unless follow-
location was enabled...

lib/transfer.c

index 90033a7bf192c7f23b1d14968788dc567b8513cc..bc07aab2bac21f552bbab11fe821bfbcfc8b55de 100644 (file)
@@ -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! */