]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_proxy: Print the correct error message for erroneous configured ProxyPass
authorJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 18 May 2007 06:06:57 +0000 (06:06 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 18 May 2007 06:06:57 +0000 (06:06 +0000)
directives. PR 40439.

(Backport of r441947)

Reviewed by: rpluem, jim, jerenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@539277 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy.c

diff --git a/CHANGES b/CHANGES
index f8904270fe8fd7d429f9c02bd3f18ff3bd18a907..d139a130149543bab647a6bf50335fc0169cfce4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.5
 
+  *) mod_proxy: Print the correct error message for erroneous configured
+     ProxyPass directives. PR 40439. [serai lans-tv.com]
+
   *) mod_so: Provide more helpful LoadModule feedback when an error occurs.
      [William Rowe]
 
index 30fc85b592bfab5f6d77ac7eb869851ab67cf8da..93524a0827cc62108766201d209f456e29ea3f47 100644 (file)
@@ -1054,11 +1054,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';