summaryrefslogtreecommitdiffstats
path: root/modules/proxy/mod_proxy.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2020-06-22 22:00:23 +0200
committerYann Ylavic <ylavic@apache.org>2020-06-22 22:00:23 +0200
commit6917e54aad49bcc2817aeb34a3d5b2d12ff0c49c (patch)
tree8a21c3453af7f4d0a17853d3892230584357b23e /modules/proxy/mod_proxy.c
parentAllow for proxy servlet mapping at pre_translate_name stage. (diff)
downloadapache2-6917e54aad49bcc2817aeb34a3d5b2d12ff0c49c.tar.xz
apache2-6917e54aad49bcc2817aeb34a3d5b2d12ff0c49c.zip
Follow up to r1879080: rename ProxyMappingDecoded to ProxyUseOriginalURI.
Same for proxy_dir_conf field. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879094 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy/mod_proxy.c')
-rw-r--r--modules/proxy/mod_proxy.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index 3e2e3e4319..a2f859e303 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -936,7 +936,7 @@ PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r, struct proxy_alias *ent,
* might consider for instance that an original %3B is a delimiter
* for path parameters (which is not).
*/
- if (!dconf->mapping_decoded
+ if (dconf->use_original_uri > 0
&& (ent->flags & PROXYPASS_MAPPING_SERVLET)) {
nocanon = 0; /* ignored since servlet's normalization applies */
len = alias_match_servlet(r->pool, r->uri, fake);
@@ -1019,10 +1019,10 @@ static int proxy_trans(request_rec *r, int pre_trans)
dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
- /* Do the work from the hook corresponding to the ProxyMappingDecoded
+ /* Do the work from the hook corresponding to the ProxyUseOriginalURI
* configuration (on/default: translate hook, off: pre_translate hook).
*/
- if (pre_trans ^ !dconf->mapping_decoded) {
+ if (pre_trans ^ (dconf->use_original_uri > 0)) {
return DECLINED;
}
@@ -1813,7 +1813,7 @@ static void *create_proxy_dir_config(apr_pool_t *p, char *dummy)
new->add_forwarded_headers_set = 0;
new->forward_100_continue = 1;
new->forward_100_continue_set = 0;
- new->mapping_decoded = -1; /* unset (on by default) */
+ new->use_original_uri = -1; /* unset (off by default) */
return (void *) new;
}
@@ -1872,8 +1872,9 @@ static void *merge_proxy_dir_config(apr_pool_t *p, void *basev, void *addv)
new->forward_100_continue_set = add->forward_100_continue_set
|| base->forward_100_continue_set;
- new->mapping_decoded = (add->mapping_decoded == -1) ? base->mapping_decoded
- : add->mapping_decoded;
+ new->use_original_uri = (add->use_original_uri == -1)
+ ? base->use_original_uri
+ : add->use_original_uri;
return new;
}
@@ -3026,9 +3027,9 @@ static const command_rec proxy_cmds[] =
AP_INIT_FLAG("Proxy100Continue", forward_100_continue, NULL, RSRC_CONF|ACCESS_CONF,
"on if 100-Continue should be forwarded to the origin server, off if the "
"proxy should handle it by itself"),
- AP_INIT_FLAG("ProxyMappingDecoded", ap_set_flag_slot_char,
- (void*)APR_OFFSETOF(proxy_dir_conf, mapping_decoded), RSRC_CONF|ACCESS_CONF,
- "Whether to percent-decode before URI-path mapping"),
+ AP_INIT_FLAG("ProxyUseOriginalURI", ap_set_flag_slot_char,
+ (void*)APR_OFFSETOF(proxy_dir_conf, use_original_uri), RSRC_CONF|ACCESS_CONF,
+ "Whether to use the original/encoded URI-path for mapping"),
{NULL}
};