]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_proxy_uwsgi: Honor "proxy-nocanon" and "proxy-noencode".
authorYann Ylavic <ylavic@apache.org>
Thu, 2 Mar 2023 14:40:38 +0000 (14:40 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 2 Mar 2023 14:40:38 +0000 (14:40 +0000)
Just like the other proxy modules.

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

modules/proxy/mod_proxy_uwsgi.c

index e8ce6c710efe1b42e2859ceb1b08fe4483f46e18..f9f3b9111b4939569bd3db799b281049df70958c 100644 (file)
@@ -84,8 +84,14 @@ static int uwsgi_canon(request_rec *r, char *url)
         host = apr_pstrcat(r->pool, "[", host, "]", NULL);
     }
 
-    path = ap_proxy_canonenc(r->pool, url, strlen(url), enc_path, 0,
-                             r->proxyreq);
+    if (apr_table_get(r->notes, "proxy-nocanon")
+        || apr_table_get(r->notes, "proxy-noencode")) {
+        path = url;   /* this is the raw/encoded path */
+    }
+    else {
+        path = ap_proxy_canonenc(r->pool, url, strlen(url), enc_path, 0,
+                                 r->proxyreq);
+    }
     if (!path) {
         return HTTP_BAD_REQUEST;
     }