]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r295013 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Thu, 6 Oct 2005 20:59:48 +0000 (20:59 +0000)
committerRuediger Pluem <rpluem@apache.org>
Thu, 6 Oct 2005 20:59:48 +0000 (20:59 +0000)
* 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

CHANGES
modules/proxy/mod_proxy_balancer.c

diff --git a/CHANGES b/CHANGES
index 4bf39c88857bd89f57cb035cfe68ab7ac154ea61..4236da9209afc93126acd1dfe82c7330691b6ed9 100644 (file)
--- 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]
index d45fab8d1aac38639f082de5d6ae011beebaefcc..3cff08ebe4cd53bd47973b831794192f6259ae97 100644 (file)
@@ -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.
          */