From: André Malo Date: Tue, 4 Sep 2007 23:09:24 +0000 (+0000) Subject: as not everyone needs sticky sessions - avoid segfault in balancer manager and X-Git-Tag: 2.3.0~1457 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42bb0116dd85db18303d58666a74346014f6430b;p=thirdparty%2Fapache%2Fhttpd.git as not everyone needs sticky sessions - avoid segfault in balancer manager and mod_status git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@572832 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index df613fe2fe2..93921b87616 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -2075,12 +2075,17 @@ static int proxy_status_hook(request_rec *r, int flags) ap_rputs("\n\n" "" "\n", r); - if (strcmp(balancer->sticky, balancer->sticky_path)) { - ap_rvputs(r, "", apr_time_sec(balancer->timeout)); diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 1a1d7763345..9d9c1fc5603 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -758,11 +758,17 @@ static int balancer_handler(request_rec *r) ap_rputs("\n\n
SSesTimeoutMethod
", balancer->sticky, " | ", balancer->sticky_path, - NULL); + if (balancer->sticky) { + if (strcmp(balancer->sticky, balancer->sticky_path)) { + ap_rvputs(r, "", balancer->sticky, " | ", + balancer->sticky_path, NULL); + } + else { + ap_rvputs(r, "", balancer->sticky, NULL); + } } else { - ap_rvputs(r, "", balancer->sticky, NULL); + ap_rputs(" - ", r); } ap_rprintf(r, "%" APR_TIME_T_FMT "
" "" "\n", r); - if (strcmp(balancer->sticky, balancer->sticky_path)) { - ap_rvputs(r, "", apr_time_sec(balancer->timeout));
StickySessionTimeoutFailoverAttemptsMethod
", balancer->sticky, " | ", balancer->sticky_path, NULL); + if (balancer->sticky) { + if (strcmp(balancer->sticky, balancer->sticky_path)) { + ap_rvputs(r, "", balancer->sticky, " | ", + balancer->sticky_path, NULL); + } + else { + ap_rvputs(r, "", balancer->sticky, NULL); + } } else { - ap_rvputs(r, "", balancer->sticky, NULL); + ap_rputs(" - ", r); } ap_rprintf(r, "%" APR_TIME_T_FMT "