]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Follow up to r1879080: replace ProxyUseOriginalURI by mapping=encoded.
authorYann Ylavic <ylavic@apache.org>
Wed, 24 Jun 2020 10:16:06 +0000 (10:16 +0000)
committerYann Ylavic <ylavic@apache.org>
Wed, 24 Jun 2020 10:16:06 +0000 (10:16 +0000)
commitb11eb1d7a34b36c60a8ca2c7c9c0a0a2f7b4d448
tree977e440d6a2446b253e7664db586f342ece9ded9
parent85ab7bcd3355fdab60acfa85bfb894b7fbcad09e
Follow up to r1879080: replace ProxyUseOriginalURI by mapping=encoded.

Instead of having a separate ProxyUseOriginalURI directive to control pre_ vs
normal translate stage, let's handle this at each ProxyPass level, with the
mapping= parameter.

At pre_translate stage mod_proxy will handle the "encoded" mapping only, and
at translate stage only the others (unless a worker was already elected at
the first stage).

Note that since mapping=servlet needs to happen encoded too, it's defined like:
    #define PROXYPASS_MAP_ENCODED 0x08
    #define PROXYPASS_MAP_SERVLET 0x18 /* + MAP_ENCODED */
so uch that proxy_trans does the right thing.

Follow up to r1879080: replace ProxyUseOriginalURI by mapping=encoded.

Instead of having a separate ProxyUseOriginalURI directive to control pre_ vs
normal translate stage, let's handle this at each ProxyPass level, with the
mapping= parameter.

At pre_translate stage mod_proxy will handle the "encoded" mapping only, and
at translate stage only the others (unless a worker was already elected at
the first stage).

Note that since mapping=servlet needs to happen encoded too, it's defined like:
    #define PROXYPASS_MAP_ENCODED 0x08
    #define PROXYPASS_MAP_SERVLET 0x18 /* + MAP_ENCODED */
so that proxy_trans does the right thing.

This allows for simpler and consistent mapping configuration, where the
translate stage depends only on the mapping= parameter.

To implement a fast path (do nothing) when no encoded mapping is configured
at pre_trans stage, or all mappings are encoded at translate stage, two bits
are added to proxy_server_conf (map_encoded_one:1, map_encoded_all:1) and
updated at load time. Thus MINOR is bumped too.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879145 13f79535-47bb-0310-9956-ffa450edef68
include/ap_mmn.h
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy.h