From: Ruediger Pluem Date: Thu, 6 Oct 2005 20:59:48 +0000 (+0000) Subject: Merge r295013 from trunk: X-Git-Tag: 2.1.9~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=645d516f6a86f18b50683f4b1c4ad41ca0233f01;p=thirdparty%2Fapache%2Fhttpd.git Merge r295013 from trunk: * Fix PR36507 (mod_proxy_balancer does not handle sticky sessions with tomcat correctly). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@306884 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 4bf39c88857..4236da9209a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.1.9 + *) mod_proxy_balancer: mod_proxy_balancer does not handle sticky sessions + with tomcat correctly. PR36507. [Ruediger Pluem] + *) SECURITY: CAN-2005-2970 (cve.mitre.org) worker MPM: Fix a memory leak which can occur after an aborted connection in some limited circumstances. [Greg Ames, Jeff Trawick] diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index d45fab8d1aa..3cff08ebe4c 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -193,7 +193,18 @@ static proxy_worker *find_session_route(proxy_balancer *balancer, *route = get_path_param(r->pool, *url, balancer->sticky); if (!*route) *route = get_cookie_param(r, balancer->sticky); - if (*route) { + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, + "proxy: BALANCER: Found value %s for " + "stickysession %s", *route, balancer->sticky); + /* + * If we found a value for sticksession, find the first '.' within. + * Everything after '.' (if present) is our route. + */ + if ((*route) && ((*route = strchr(*route, '.')) != NULL )) + (*route)++; + if ((*route) && (**route)) { + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, + "proxy: BALANCER: Found route %s", *route); /* We have a route in path or in cookie * Find the worker that has this route defined. */