]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: config: do not report twice the incompatibility between cookie and non...
authorWilly Tarreau <w@1wt.eu>
Thu, 31 May 2012 18:43:11 +0000 (20:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 31 May 2012 18:47:00 +0000 (20:47 +0200)
This one was already taken care of in proxy_cfg_ensure_no_http(), so if a
cookie is presented in a TCP backend, we got two warnings.

This can be backported to 1.4 since it's been this way for 2 years (although not dramatic).

include/types/proxy.h
src/cfgparse.c

index 2cbf075a4247e63b30a1fb7790cb4ee490474c2e..1da0f9ddb03e7fc69a43948f54b24eb6ea847e20 100644 (file)
@@ -161,14 +161,14 @@ enum {
 /* end of proxy->options2 */
 
 /* Cookie settings for pr->ck_opts */
-#define PR_CK_RW    0x00000001      /* rewrite all direct cookies with the right serverid */
-#define PR_CK_IND   0x00000002      /* keep only indirect cookies */
-#define PR_CK_INS   0x00000004      /* insert cookies when not accessing a server directly */
-#define PR_CK_PFX   0x00000008      /* rewrite all cookies by prefixing the right serverid */
-#define PR_CK_ANY   (PR_CK_RW | PR_CK_IND | PR_CK_INS | PR_CK_PFX)
-#define PR_CK_NOC   0x00000010      /* add a 'Cache-control' header with the cookie */
-#define PR_CK_POST  0x00000020      /* don't insert cookies for requests other than a POST */
-#define PR_CK_PSV   0x00000040      /* cookie ... preserve */
+#define PR_CK_RW        0x00000001      /* rewrite all direct cookies with the right serverid */
+#define PR_CK_IND       0x00000002      /* keep only indirect cookies */
+#define PR_CK_INS       0x00000004      /* insert cookies when not accessing a server directly */
+#define PR_CK_PFX       0x00000008      /* rewrite all cookies by prefixing the right serverid */
+#define PR_CK_ANY       (PR_CK_RW | PR_CK_IND | PR_CK_INS | PR_CK_PFX)
+#define PR_CK_NOC       0x00000010      /* add a 'Cache-control' header with the cookie */
+#define PR_CK_POST      0x00000020      /* don't insert cookies for requests other than a POST */
+#define PR_CK_PSV       0x00000040      /* cookie ... preserve */
 
 /* bits for sticking rules */
 #define STK_IS_MATCH   0x00000001      /* match on request fetch */
index 93783ab712d402e01f63f6208bf9d6df80627b2f..a7aade5aa6b864caf396d94232a8827d7674c48e 100644 (file)
@@ -6410,12 +6410,6 @@ out_uri_auth_compat:
                if (curproxy->mode != PR_MODE_HTTP) {
                        int optnum;
 
-                       if (curproxy->ck_opts) {
-                               Warning("config : 'cookie' statement ignored for %s '%s' as it requires HTTP mode.\n",
-                                       proxy_type_str(curproxy), curproxy->id);
-                               err_code |= ERR_WARN;
-                       }
-
                        if (curproxy->uri_auth) {
                                Warning("config : 'stats' statement ignored for %s '%s' as it requires HTTP mode.\n",
                                        proxy_type_str(curproxy), curproxy->id);