summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuediger Pluem <rpluem@apache.org>2006-09-10 12:37:21 +0000
committerRuediger Pluem <rpluem@apache.org>2006-09-10 12:37:21 +0000
commitef038e0617cc9ba17a11afa1e60d7ac1f98217a1 (patch)
tree68296e9a1b3afa3c601ceea8189b038f3036a444
parent01a2b321133b230a2d2e19ab1be2d99198dc1876 (diff)
downloadhttpd-ef038e0617cc9ba17a11afa1e60d7ac1f98217a1.tar.gz
* Print the correct error message for erroneous configured ProxyPass directives.
PR: 40439 Submitted by: serai lans-tv.com Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@441947 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--modules/proxy/mod_proxy.c19
2 files changed, 17 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 35bde246a2..be3e3d83b3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
Changes with Apache 2.3.0
[Remove entries to the current 2.0 and 2.2 section below, when backported]
+ *) mod_proxy: Print the correct error message for erroneous configured
+ ProxyPass directives. PR 40439. [serai lans-tv.com]
+
*) Allow htcacheclean, httxt2dbm, and fcgistarter to link apr/apr-util
statically like the older support programs.
[Eric Covener <covener gmail.com>]
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index 54fff0fe39..5795d53324 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -1124,11 +1124,20 @@ static const char *
else {
char *val = strchr(word, '=');
if (!val) {
- if (cmd->path)
- return "Invalid ProxyPass parameter. Parameter must be "
- "in the form 'key=value'";
- else
- return "ProxyPass can not have a path when defined in a location";
+ if (cmd->path) {
+ if (*r == '/') {
+ return "ProxyPass can not have a path when defined in "
+ "a location.";
+ }
+ else {
+ return "Invalid ProxyPass parameter. Parameter must "
+ "be in the form 'key=value'.";
+ }
+ }
+ else {
+ return "Invalid ProxyPass parameter. Parameter must be "
+ "in the form 'key=value'.";
+ }
}
else
*val++ = '\0';