summaryrefslogtreecommitdiffstats
path: root/modules/proxy/mod_proxy.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2020-06-30 14:29:06 +0200
committerYann Ylavic <ylavic@apache.org>2020-06-30 14:29:06 +0200
commit8ca85017f6433e528280dcb90577425805ef88e8 (patch)
treecd5dadc11e63db251e6313ad181b2a8fe2a63599 /modules/proxy/mod_proxy.c
parentmod_proxy: unfail mixed ProxyPass/<Proxy> and ProxyPassMatch/<ProxyMatch>. (diff)
downloadapache2-8ca85017f6433e528280dcb90577425805ef88e8.tar.xz
apache2-8ca85017f6433e528280dcb90577425805ef88e8.zip
Revert r1879361: 2.4.x material only.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879363 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/proxy/mod_proxy.c33
1 files changed, 8 insertions, 25 deletions
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index e40d8f8c87..d730a6d047 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -2185,21 +2185,10 @@ static const char *
PROXY_COPY_CONF_PARAMS(worker, conf);
}
else if ((use_regex != 0) ^ (worker->s->is_name_matchable != 0)) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(10249)
- "ProxyPass/<Proxy> and ProxyPassMatch/<ProxyMatch> "
- "can't be used altogether with the same worker "
- "name (%s); ignoring ProxyPass%s",
- worker->s->name, use_regex ? "Match" : "");
- /* Rollback new alias */
- if (cmd->path) {
- dconf->alias = NULL;
- dconf->alias_set = 0;
- }
- else {
- memset(new, 0, sizeof(*new));
- apr_array_pop(conf->aliases);
- }
- return NULL;
+ return apr_pstrcat(cmd->temp_pool, "ProxyPass/<Proxy> and "
+ "ProxyPassMatch/<ProxyMatch> can't be used "
+ "together with the same worker name ",
+ "(", worker->s->name, ")", NULL);
}
else {
reuse = 1;
@@ -2966,15 +2955,10 @@ static const char *proxysection(cmd_parms *cmd, void *mconfig, const char *arg)
" ", err, NULL);
}
else if ((use_regex != 0) ^ (worker->s->is_name_matchable != 0)) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(10250)
- "ProxyPass/<Proxy> and ProxyPassMatch/<ProxyMatch> "
- "can't be used altogether with the same worker "
- "name (%s); ignoring <Proxy%s>",
- worker->s->name, use_regex ? "Match" : "");
- /* Rollback new section */
- ((void **)sconf->sec_proxy->elts)[sconf->sec_proxy->nelts - 1] = NULL;
- apr_array_pop(sconf->sec_proxy);
- goto cleanup;
+ return apr_pstrcat(cmd->temp_pool, "ProxyPass/<Proxy> and "
+ "ProxyPassMatch/<ProxyMatch> can't be used "
+ "altogether with the same worker name ",
+ "(", worker->s->name, ")", NULL);
}
if (!worker->section_config) {
worker->section_config = new_dir_conf;
@@ -3005,7 +2989,6 @@ static const char *proxysection(cmd_parms *cmd, void *mconfig, const char *arg)
}
}
-cleanup:
cmd->path = old_path;
cmd->override = old_overrides;