On Wed, Jun 26, 2024 at 9:05 AM Ruediger Pluem <rpl...@apache.org> wrote: > > On 6/26/24 1:49 AM, yla...@apache.org wrote: > > > > --- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original) > > +++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Tue Jun 25 23:49:09 2024 > > > @@ -1319,22 +1320,29 @@ static int proxy_handler(request_rec *r) > > return DECLINED; > > } > > > > - if (!r->proxyreq) { > > - rc = DECLINED; > > - /* We may have forced the proxy handler via config or .htaccess */ > > - if (r->handler && > > - strncmp(r->handler, "proxy:", 6) == 0 && > > - strncmp(r->filename, "proxy:", 6) != 0) { > > - r->proxyreq = PROXYREQ_REVERSE; > > - r->filename = apr_pstrcat(r->pool, r->handler, r->filename, > > NULL); > > - /* Still need to fixup/canonicalize r->filename */ > > + /* We may have forced the proxy handler via config or .htaccess */ > > + if (!r->proxyreq && r->handler && strncmp(r->handler, "proxy:", 6) == > > 0) { > > + char *old_filename = r->filename; > > + > > + r->proxyreq = PROXYREQ_REVERSE; > > + r->filename = apr_pstrcat(r->pool, r->handler, r->filename, NULL); > > + > > + /* Still need to fixup/canonicalize r->filename */ > > + uri = r->filename + 6; > I don't think that we need to set uri to anything here. It either gets set > below in > ap_proxy_fixup_uds_filename below or if not we set it to r->filename + 6 > later (line 1427).
I simplified ap_proxy_fixup_uds_filename() in r1918647, it takes only the request now and those who want the new url can use r->filename + 6 (like ap_proxy_pre_request() does). > > > + rc = ap_proxy_fixup_uds_filename(r, &uri); > > + if (rc <= OK) { > > rc = proxy_fixup(r); > > } > > if (rc != OK) { > > - return rc; > > + r->filename = old_filename; > > + r->proxyreq = 0; > > } > > - } Regards; Yann.