]> granicus.if.org Git - apache/commitdiff
* Fix PR36507 (mod_proxy_balancer does not handle sticky sessions with
authorRuediger Pluem <rpluem@apache.org>
Wed, 5 Oct 2005 07:59:36 +0000 (07:59 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 5 Oct 2005 07:59:36 +0000 (07:59 +0000)
  tomcat correctly).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@295013 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy_balancer.c

diff --git a/CHANGES b/CHANGES
index bd68509e1a8328ddf881ffb5a5256f4bc1b476c0..4ae8a9aca3eae4b56d5eee0fe257e81ec790049f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) mod_proxy_balancer: mod_proxy_balancer does not handle sticky sessions
+     with tomcat correctly. PR36507. [Ruediger Pluem]
+
   *) mod_proxy: Run the request_status hook also if there are no free workers
      or all workers are in error state.
      [Ruediger Pluem, Brian Akins <brian.akins turner.com>]
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.
          */