You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2024/06/24 17:52:32 UTC

svn commit: r1918559 - in /httpd/httpd/branches/2.4.x: ./ modules/proxy/mod_proxy.c

Author: covener
Date: Mon Jun 24 17:52:31 2024
New Revision: 1918559

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

mod_proxy: escape for non-proxypass configuration


Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c

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

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c?rev=1918559&r1=1918558&r2=1918559&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c Mon Jun 24 17:52:31 2024
@@ -1314,15 +1314,18 @@ static int proxy_handler(request_rec *r)
     }
 
     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 */
+            rc = proxy_fixup(r);
         }
-        else {
-            return DECLINED;
+        if (rc != OK) {
+            return rc;
         }
     } else if (strncmp(r->filename, "proxy:", 6) != 0) {
         return DECLINED;