]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mod_proxy: Don't decode r->uri and reencode in r->filename for mapping=encoded.
authorYann Ylavic <ylavic@apache.org>
Thu, 2 Mar 2023 14:30:20 +0000 (14:30 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 2 Mar 2023 14:30:20 +0000 (14:30 +0000)
commit52930446f6789abc1a77f70b3f24a3f960e5aa64
treecafc20a3d0687de89a431e8bb1bf02d8e5f1bf7f
parent4e72887d7e9c7c35a9dd51b9e380b03a99809e7b
mod_proxy: Don't decode r->uri and reencode in r->filename for mapping=encoded.

Decoding was not done for mapping=servlet only (a subset), but overlooked for
mapping=encoded. To avoid double-encoding in the canon_handler hook, use a new
"proxy-noencode" (similarly to "proxy-nocanon") entry in r->notes.

* proxy/mod_proxy.c(ap_proxy_trans_match):
  Set "proxy-noencode" in r->notes for PROXYPASS_MAP_ENCODED, and return DONE
  to avoid decoding in ap_process_request_internal().

* proxy/mod_proxy_http.c, proxy/mod_proxy_ajp.c, proxy/mod_proxy_wstunnel.c,
  proxy/mod_proxy_fcgi.c, proxy/mod_proxy_ajp.c, http2/mod_proxy_http2.c:
  Don't process the url through ap_proxy_canonenc() in canon_handler if
  "proxy-noencode" is set.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907972 13f79535-47bb-0310-9956-ffa450edef68
modules/http2/mod_proxy_http2.c
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy_ajp.c
modules/proxy/mod_proxy_balancer.c
modules/proxy/mod_proxy_fcgi.c
modules/proxy/mod_proxy_http.c
modules/proxy/mod_proxy_wstunnel.c