You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2005/10/06 22:59:59 UTC

svn commit: r306884 - in /httpd/httpd/branches/2.2.x: CHANGES modules/proxy/mod_proxy_balancer.c

Author: rpluem
Date: Thu Oct  6 13:59:48 2005
New Revision: 306884

URL: http://svn.apache.org/viewcvs?rev=306884&view=rev
Log:
Merge r295013 from trunk:

* Fix PR36507 (mod_proxy_balancer does not handle sticky sessions with
  tomcat correctly).


Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_balancer.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/CHANGES?rev=306884&r1=306883&r2=306884&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Oct  6 13:59:48 2005
@@ -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]

Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_balancer.c?rev=306884&r1=306883&r2=306884&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_balancer.c Thu Oct  6 13:59:48 2005
@@ -193,7 +193,18 @@
     *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.
          */