]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
ap_proxy_define_match_worker: disable connection reuse by default.
authorYann Ylavic <ylavic@apache.org>
Fri, 19 Jun 2020 17:30:24 +0000 (17:30 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 19 Jun 2020 17:30:24 +0000 (17:30 +0000)
To avoid compat issues with dns/connection reuse now that a worker with
dollar substitution can be elected.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879000 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_util.c

index 59b77aa7c3233a26257f24333e298f79efc556e1..b7ec07a51736b11376fd81eceb5721b3ac1608a4 100644 (file)
@@ -1962,6 +1962,16 @@ PROXY_DECLARE(char *) ap_proxy_define_match_worker(apr_pool_t *p,
     }
 
     (*worker)->s->is_name_matchable = 1;
+    if (pdollar) {
+        /* Before ap_proxy_define_match_worker() existed, a regex worker
+         * with dollar substitution was never matched against the actual
+         * URL thus the request fell through the generic worker. To avoid
+         * dns and connection reuse compat issues, let's disable connection
+         * reuse by default, it can still be overwritten by an explicit
+         * enablereuse=on.
+         */
+        (*worker)->s->disablereuse = 1;
+    }
     return NULL;
 }