httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r770293 - /httpd/httpd/trunk/modules/proxy/mod_proxy.c
Date Thu, 30 Apr 2009 15:43:34 GMT
Author: jfclere
Date: Thu Apr 30 15:43:34 2009
New Revision: 770293

URL: http://svn.apache.org/viewvc?rev=770293&view=rev
Log:
Prevent key=value being accepted as url.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=770293&r1=770292&r2=770293&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Thu Apr 30 15:43:34 2009
@@ -1761,22 +1761,26 @@
 
     if (cmd->path)
         path = apr_pstrdup(cmd->pool, cmd->path);
+
     while (*arg) {
+        char *val;
         word = ap_getword_conf(cmd->pool, &arg);
-        if (!path)
-            path = word;
-        else if (!name)
-            name = word;
-        else {
-            char *val = strchr(word, '=');
-            if (!val)
+        val = strchr(word, '=');
+
+        if (!val) {
+            if (!path)
+                path = word;
+            else if (!name)
+                name = word;
+            else {
                 if (cmd->path)
                     return "BalancerMember can not have a balancer name when defined in a
location";
                 else
                     return "Invalid BalancerMember parameter. Parameter must "
                            "be in the form 'key=value'";
-            else
-                *val++ = '\0';
+            }
+        } else {
+            *val++ = '\0';
             apr_table_setn(params, word, val);
         }
     }



Mime
View raw message