From: Yann Ylavic Date: Thu, 2 Mar 2023 14:40:38 +0000 (+0000) Subject: mod_proxy_uwsgi: Honor "proxy-nocanon" and "proxy-noencode". X-Git-Tag: 2.5.0-alpha2-ci-test-only~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09334759040db6668f110a1b31b858c17d2cadbf;p=thirdparty%2Fapache%2Fhttpd.git mod_proxy_uwsgi: Honor "proxy-nocanon" and "proxy-noencode". Just like the other proxy modules. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907976 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_uwsgi.c b/modules/proxy/mod_proxy_uwsgi.c index e8ce6c710ef..f9f3b9111b4 100644 --- a/modules/proxy/mod_proxy_uwsgi.c +++ b/modules/proxy/mod_proxy_uwsgi.c @@ -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; }