Changes with Apache 2.4.4
+ *) mod_proxy: Add ability to configure the sticky session separator.
+ PR 53893. [<inu inusasha de>, Jim Jagielski]
+
*) mod_dumpio: Correctly log large messages
PR 54179 [Marek Wianecki <mieszek2 interia pl>]
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_proxy: Allow for setting of sticky session split char...
- PR 53893.
- trunk patch: http://svn.apache.org/viewvc?rev=1404653&view=rev
- 2.4.x patch: http://people.apache.org/~jim/patches/sticky-sep-2.4.patch
- +1: jim, covener, sf
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
and url encoded id (like servlet containers) use | to to separate them.
The first part is for the cookie the second for the path.
</td></tr>
+ <tr><td>stickysessionsep</td>
+ <td>"."</td>
+ <td>Sets the separation symbol in the session cookie. Some backend application servers
+ do not use the '.' as the symbol. For example the Oracle Weblogic server uses
+ '!'. The correct symbol can be set using this option. The setting of 'Off'
+ signifies that no symbol is used.
+ </td></tr>
<tr><td>scolonpathdelim</td>
<td>Off</td>
<td>If set to <code>On</code> the semi-colon character ';' will be
* 20120211.5 (2.4.3-dev) Add missing HTTP status codes registered with IANA.
* 20120211.6 (2.4.3-dev) Add ap_proxy_checkproxyblock2.
* 20120211.7 (2.4.3-dev) Add ap_get_loadavg()
+ * 20120211.8 (2.4.3-dev) Add sticky_separator to proxy_balancer_shared struct.
*/
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20120211
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 7 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 8 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
PROXY_STRNCPY(balancer->s->sticky_path, path);
}
}
+ else if (!strcasecmp(key, "stickysessionsep")) {
+ /* separator/delimiter for sessionid and route,
+ * normally '.'
+ */
+ if (strlen(val) != 1) {
+ if (!strcasecmp(val, "off"))
+ balancer->s->sticky_separator = 0;
+ else
+ return "stickysessionsep must be a single character or Off";
+ }
+ else
+ balancer->s->sticky_separator = *val;
+ }
else if (!strcasecmp(key, "nofailover")) {
/* If set to 'on' the session will break
* if the worker is in error state or
unsigned int vhosted:1;
unsigned int inactive:1;
unsigned int forcerecovery:1;
+ char sticky_separator; /* separator for sessionid/route */
} proxy_balancer_shared;
#define ALIGNED_PROXY_BALANCER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_balancer_shared)))
}
}
/*
- * If we found a value for sticksession, find the first '.' within.
- * Everything after '.' (if present) is our route.
+ * If we found a value for stickysession, find the first '.' (or whatever
+ * sticky_separator is set to) within. Everything after '.' (if present)
+ * is our route.
*/
- if ((*route) && ((*route = strchr(*route, '.')) != NULL ))
+ if ((*route) && (balancer->s->sticky_separator != 0) && ((*route = strchr(*route, balancer->s->sticky_separator)) != NULL ))
(*route)++;
if ((*route) && (**route)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01161) "Found route %s", *route);
(*balancer)->hash = bshared->hash;
bshared->forcerecovery = 1;
+ bshared->sticky_separator = '.';
*bshared->nonce = PROXY_UNSET_NONCE; /* impossible valid input */
(*balancer)->s = bshared;