From: Yann Ylavic Date: Mon, 13 Dec 2021 16:42:05 +0000 (+0000) Subject: Merge r1890477, r1895895, r1895907 from trunk: [skip ci] X-Git-Tag: candidate-2.4.52-rc1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=093c08c6c141e2c0a9be2cc45b5d5fd0821faf1d;p=thirdparty%2Fapache%2Fhttpd.git Merge r1890477, r1895895, r1895907 from trunk: [skip ci] Add mapping = servlet / encoded Improve docs for ProxyPass mapping= parameter. Add a note about aliging mapping= with the backend's. Submitted by: jfclere, ylavic, ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895908 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml index 64fe9caaa61..cc980a0b27a 100644 --- a/docs/manual/mod/mod_proxy.xml +++ b/docs/manual/mod/mod_proxy.xml @@ -1244,6 +1244,33 @@ ProxyPass "/example" "http://backend.example.com" max=20 ttl=120 retry=300

Protocol accepted in the Upgrade header by mod_proxy_wstunnel. See the documentation of this module for more details.

+ mapping + - +

Type of mapping between the path and the url. + This determines the normalization and/or (non-)decoding that mod_proxy + will apply to the requested uri-path before matching the path. If + a mapping matches, it's committed to the uri-path such that all the directory + contexts that use a path (like <Location>) will be matched using the + same mapping. +

mapping=encoded prevents the %-decoding of the uri-path so + that one can match for instance /some%2furi%2fpath%2fwith%2fslash in a + ProxyPass or in a <Location> context.

+

mapping=servlet refers to the normalization defined by the Servlet + specification, which is for instance applied by Apache Tomcat for servlet containers + (notably the path parameters are ignored for the mapping). An uri-path like + /some;foo/path is then mapped as /some/path hence matches:

+

<Location /some/path> or:

+

ProxyPass "/some/path" "https://tomcat.example.com/some/path"

+

regardless of the requested path parameters.

+ Note +

It is recommended to use the same mapping on the Apache httpd side than the one + used on the backend side. For instance when configuring authorizations in + <Location> blocks for paths that are mapped by mod_proxy + to some servlet containers (like applications running on Apache Tomcat), one should + use the mapping=servlet setting to prevent path parameters and alike from + interfering with the authorizations that are to be enforced in by the Apache httpd.

+
+