httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject [PATCH] PR36507: mod_proxy_balancer does not handle sticky sessions with tomcat correctly
Date Mon, 03 Oct 2005 10:48:04 GMT
Hi,

any objections / comments to the following patch for PR36507?
If not I would commit it to the trunk in 24 hours.

Regards

RĂ¼diger


Index: modules/proxy/mod_proxy_balancer.c
===================================================================
--- modules/proxy/mod_proxy_balancer.c  (Revision 292553)
+++ modules/proxy/mod_proxy_balancer.c  (Arbeitskopie)
@@ -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.
          */

Mime
View raw message