]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] http-check disable-on-404 is not limited to HTTP mode
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Nov 2007 14:20:09 +0000 (15:20 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 30 Nov 2007 14:20:09 +0000 (15:20 +0100)
This option is for health-checks, do not limit it to HTTP proxies.

src/cfgparse.c

index f283332b4e00e34e77e9abb3b5c49abf2f9b7514..b407b078cb20a0dedaa46a7ed159009dbefb0708 100644 (file)
@@ -2538,11 +2538,6 @@ int readcfgfile(const char *file)
                                Warning("parsing %s : Layer 7 hash not possible for %s '%s'. Falling back to round robin.\n",
                                        file, proxy_type_str(curproxy), curproxy->id);
                        }
-                       if (curproxy->options & PR_O_DISABLE404) {
-                               curproxy->options &= ~PR_O_DISABLE404;
-                               Warning("parsing %s : '%s' will be ignored for %s '%s' (requires HTTP mode).\n",
-                                       file, "disable-on-404", proxy_type_str(curproxy), curproxy->id);
-                       }
                }
 
                if (curproxy->mode == PR_MODE_HEALTH) { /* TCP PROXY or HEALTH CHECK */
@@ -2558,11 +2553,12 @@ int readcfgfile(const char *file)
                                      file, curproxy->id);
                                cfgerr++;
                        }
-                       if ((curproxy->options & PR_O_DISABLE404) && !(curproxy->options & PR_O_HTTP_CHK)) {
-                               curproxy->options &= ~PR_O_DISABLE404;
-                               Warning("parsing %s : '%s' will be ignored for %s '%s' (requires 'option httpchk').\n",
-                                       file, "disable-on-404", proxy_type_str(curproxy), curproxy->id);
-                       }
+               }
+
+               if ((curproxy->options & PR_O_DISABLE404) && !(curproxy->options & PR_O_HTTP_CHK)) {
+                       curproxy->options &= ~PR_O_DISABLE404;
+                       Warning("parsing %s : '%s' will be ignored for %s '%s' (requires 'option httpchk').\n",
+                               file, "disable-on-404", proxy_type_str(curproxy), curproxy->id);
                }
 
                /* if a default backend was specified, let's find it */