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 2025/06/04 07:36:11 UTC

svn commit: r1926107 - in /httpd/httpd/branches/2.4.x: ./ STATUS changes-entries/pr69443.txt modules/proxy/mod_proxy_balancer.c

Author: rpluem
Date: Wed Jun  4 07:36:11 2025
New Revision: 1926107

URL: http://svn.apache.org/viewvc?rev=1926107&view=rev
Log:
Merge r1925109 from trunk:

* 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

Added:
    httpd/httpd/branches/2.4.x/changes-entries/pr69443.txt
      - copied unchanged from r1925109, httpd/httpd/trunk/changes-entries/pr69443.txt
Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1925109

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1926107&r1=1926106&r2=1926107&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Wed Jun  4 07:36:11 2025
@@ -183,16 +183,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
         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

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c?rev=1926107&r1=1926106&r2=1926107&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c Wed Jun  4 07:36:11 2025
@@ -276,11 +276,23 @@ static proxy_worker *find_session_route(
                                         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",