>From 7046fe6b5245deb06f760896fa7e10c2163eda60 Mon Sep 17 00:00:00 2001
From: Krzysztof Piotr Oledzki <[email protected]>
Date: Wed, 6 Jan 2010 15:03:18 +0100
Subject: [BUG] stats: cookie should be reported under backend not under proxy

---
 src/dumpstats.c |   29 ++++++++++++++++-------------
 1 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/src/dumpstats.c b/src/dumpstats.c
index a9422e2..495e280 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -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,
-- 
1.6.4.2


Reply via email to