* Temporarily add back the query string to the URL as it might contain the
routing information for sticky sessions.
PR: 69443
Reviewed by: rpluem, covener, ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1926107 13f79535-47bb-0310-9956-
ffa450edef68
https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/533.diff
+1 covener, rpluem, jorton
- *) mod_proxy_balancer: Fix a regression that caused stickysession keys no
- longer be recognized if they are provided as query parameter in the URL.
- PR 69443
- Trunk version of patch:
- https://svn.apache.org/r1925109
- Backport version for 2.4.x of patch:
- Trunk version of patch works
- svn merge -c 1925109 ^/httpd/httpd/trunk .
- +1: rpluem, covener, ylavic
-
*) mod_systemd: Add systemd socket activation
Trunk version of patch:
https://svn.apache.org/r1511033
--- /dev/null
+ *) mod_proxy_balancer: Fix a regression that caused stickysession keys no
+ longer be recognized if they are provided as query parameter in the URL.
+ PR 69443 [Ruediger Pluem]
char **url)
{
proxy_worker *worker = NULL;
+ char *url_with_qs;
if (!*balancer->s->sticky)
return NULL;
+ /*
+ * The route might be contained in the query string and *url is not
+ * supposed to contain the query string. Hence add it temporarily if
+ * present.
+ */
+ if (r->args) {
+ url_with_qs = apr_pstrcat(r->pool, *url, "?", r->args, NULL);
+ }
+ else {
+ url_with_qs = *url;
+ }
/* Try to find the sticky route inside url */
- *route = get_path_param(r->pool, *url, balancer->s->sticky_path, balancer->s->scolonsep);
+ *route = get_path_param(r->pool, url_with_qs, balancer->s->sticky_path, balancer->s->scolonsep);
if (*route) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01159)
"Found value %s for stickysession %s",