From: Krzysztof Piotr Oledzki Date: Wed, 6 Jan 2010 14:03:18 +0000 (+0100) Subject: [BUG] stats: cookie should be reported under backend not under proxy X-Git-Tag: v1.4-dev6~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0f0c8605bc10255a8f0ec8aea00ce1f4ed2be40;p=thirdparty%2Fhaproxy.git [BUG] stats: cookie should be reported under backend not under proxy --- diff --git a/src/dumpstats.c b/src/dumpstats.c index a9422e2e04..495e28007d 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,