The test case for PR 45434 seems to have regressed across 2.2->2.4.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45434
I have not tried to understand the mechanics here, but a dumb
side-by-side analysis found a missing piece, below. 2.2 hardcodes this
as "real + 11" but 2.4 uses the constant elsewhere. Any reason why this
would be wrong? It fixes the test case I added to t/modules/proxy.t.
2.2.x code for reference:
http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c?annotate=1058624#l1090
Index: modules/proxy/proxy_util.c
===================================================================
--- modules/proxy/proxy_util.c (revision 1365029)
+++ modules/proxy/proxy_util.c (working copy)
@@ -860,7 +860,7 @@
(balancer = ap_proxy_get_balancer(r->pool, sconf, real, 1))) {
int n, l3 = 0;
proxy_worker **worker = (proxy_worker **)balancer->workers->elts;
- const char *urlpart = ap_strchr_c(real, '/');
+ const char *urlpart = ap_strchr_c(real + sizeof(BALANCER_PREFIX) - 1, '/');
if (urlpart) {
if (!urlpart[1])
urlpart = NULL;
|