]> granicus.if.org Git - apache/commitdiff
Prevent / beeing accepted wrongly by the proxy when having for example:
authorJean-Frederic Clere <jfclere@apache.org>
Wed, 18 Aug 2004 16:46:12 +0000 (16:46 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Wed, 18 Aug 2004 16:46:12 +0000 (16:46 +0000)
<Location /examples/>
   ProxyPass ajp://localhost:8009/examples/
</Location>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104714 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy.c

index 26cdbd2d6b323063a3201bf5b930ae4a3ca64ec8..bac52dd4074630fb6cd373019d096077a30ec732 100644 (file)
@@ -257,6 +257,13 @@ static int alias_match(const char *uri, const char *alias_fakename)
         urip = end_uri;
     }
 
+   /* We reach the end of the uri before the end of "alias_fakename"
+    * for example uri is "/" and alias_fakename "/examples"
+    */
+   if (urip == end_uri && aliasp!=end_fakename) {
+       return 0;
+   }
+
     /* Check last alias path component matched all the way */
     if (aliasp[-1] != '/' && *urip != '\0' && *urip != '/')
         return 0;