Bug 42513 - Add possibility to choose the session id / route separator (for use with WebSphere)
Summary: Add possibility to choose the session id / route separator (for use with WebS...
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy_balancer (show other bugs)
Version: 2.2.4
Hardware: Other other
: P2 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2007-05-24 08:49 UTC by Nicolas Guillaumin
Modified: 2018-02-25 19:57 UTC (History)
1 user (show)

Allow routeseparator to be set using ProxySet for balancers (2.21 KB, patch)
2008-09-08 11:52 UTC, rahul
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Guillaumin 2007-05-24 08:49:44 UTC

I'm trying to use mod_proxy and mod_proxy_balancer to serve a cluster of IBM
WebSphere v6 Application Servers.
I set the "route" parameter of the BalancerMember directive to use Sticky Sessions.

In tomcat, the session cookie contains "sessionid.route" (dot as separator).
In WebSphere, the session cookie contains "sessionid:route" (colon as separator).

The dot is hardcoded in mod_proxy_balancer.c (line 254). I think this is a bad
idea, because it forces me to patch that module and use this special patched
version for my web server install.

Moreover, it seems that some other application servers use another separator,
the plus sign "+".

It would be great if I can have for example a <ProxySet routeseparator ":">
directive to configure my separator...
Comment 1 rahul 2008-09-08 11:52:12 UTC
Created attachment 22543 [details]
Allow routeseparator to be set using ProxySet for balancers

This is used as below
   <Proxy balancer://mycluster>
     BalancerMember http://vayavyam.india.sun.com:8080 route=j1
     BalancerMember http://vaishnavam.india.sun.com:8080 route=j2
     ProxySet routeseparator=:

Would it make sense to allow a regular expression to extract the route from
   # when it is colon format
   ProxySet routeexp=".*:(.+)$"
   # when the route is defined first
   ProxySet routeexp="([^.]+)\..*$"
Comment 2 pierre.casenove 2009-06-29 00:34:50 UTC
I'm exactly in the same case. The proposed patch is working on my installation.
When will it be integrated in the official release?

Thanks in advance,

Comment 3 Daniel Ruggeri 2010-03-29 18:57:36 UTC
   The functionality you requested was actually added in 2.2.10 (http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass) and is called scolonpathdelim.

   Rather than close this bug, though, I would like input from others - this patch seems to be more "usuable" rather than enabling scolonpathdelim since this patch would permit using any number of characters as the delimiter (compared to the two afforded by the current setup).
Comment 4 pierre.casenove 2010-03-29 19:26:14 UTC
Well... I don't really agree!
WebSphere is using the colon sign ':' by dafault, or the plus sign '+' if you activate a specific config.
With the option you're mentionning, you set the delimiter to semi colon sign ';'... which is close but still fails ;)

Thanks in advance,
Comment 5 Daniel Ruggeri 2010-03-30 18:43:33 UTC
   That is correct! My apologies, I guess I never realized it uses the colon instead of the semicolon. I still agree with you, though, this patch provides better functionality than the existing scolonpathdelim option.

   I don't know what will happen with this patch, but in the past we have had a similar problem. I created a recipe on the httpd wiki to show how we worked through it - I hope it works for you as well.

I'd give your patch a +1 if it counted :)
Comment 6 Daniel Ruggeri 2013-05-10 21:38:58 UTC
2.4 and trunk allows use of the stickysessionsep now.
Comment 7 Rainer Jung 2018-02-25 19:57:16 UTC
Undo spam change