]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] stats: cookie should be reported under backend not under proxy
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Wed, 6 Jan 2010 14:03:18 +0000 (15:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Jan 2010 23:34:27 +0000 (00:34 +0100)
src/dumpstats.c

index a9422e2e04d447fc3d0c932c95a85c6771029aca..495e28007d4bbb25fba841c088e50a7c647fd084 100644 (file)
@@ -1239,17 +1239,6 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri)
                                        proxy_cap_str(px->cap), proxy_mode_str(px->mode),
                                        px->uuid);
 
-                               /* cookie */
-                               if (px->cookie_name) {
-                                       struct chunk src;
-
-                                       chunk_printf(&msg, ", cookie: '");
-                                       chunk_initlen(&src, px->cookie_name, 0, strlen(px->cookie_name));
-                                       chunk_htmlencode(&msg, &src);
-
-                                       chunk_printf(&msg, "'");
-                               }
-
                                chunk_printf(&msg, "\"");
                        }
 
@@ -1897,9 +1886,23 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri)
 
                                if (uri->flags&ST_SHLGNDS) {
                                        /* balancing */
-
-                                        chunk_printf(&msg, " title=\"balancing: %s\"",
+                                        chunk_printf(&msg, " title=\"balancing: %s",
                                                 backend_lb_algo_str(px->lbprm.algo & BE_LB_ALGO));
+
+                                       /* cookie */
+                                       if (px->cookie_name) {
+                                               struct chunk src;
+
+                                               chunk_printf(&msg, ", cookie: '");
+
+                                               chunk_initlen(&src, px->cookie_name, 0, strlen(px->cookie_name));
+                                               chunk_htmlencode(&msg, &src);
+
+                                               chunk_printf(&msg, "'");
+                                       }
+
+                                       chunk_printf(&msg, "\"");
+
                                }
 
                                chunk_printf(&msg,