]> granicus.if.org Git - apache/commitdiff
Make cgi-bin work as a regular directory when using mod_vhost_alias
authorTony Finch <fanf@apache.org>
Wed, 15 Nov 2000 02:54:48 +0000 (02:54 +0000)
committerTony Finch <fanf@apache.org>
Wed, 15 Nov 2000 02:54:48 +0000 (02:54 +0000)
with no VirtualScriptAlias directives.
PR: 6829

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

modules/mappers/mod_vhost_alias.c

index 81e7faba5cfb2e91dfa0f8b86b42d17d0534561c..e45148defc26e70687a95d5515fe6ee08f456715 100644 (file)
@@ -424,9 +424,12 @@ static int mva_translate(request_rec *r)
   
     conf = (mva_sconf_t *) ap_get_module_config(r->server->module_config,
                                              &vhost_alias_module);
-    cgi = strstr(r->uri, "cgi-bin/");
-    if (cgi && cgi - r->uri != strspn(r->uri, "/")) {
-        cgi = NULL;
+    cgi = NULL;
+    if (conf->cgi_root) {
+       cgi = strstr(r->uri, "cgi-bin/");
+       if (cgi && cgi - r->uri != strspn(r->uri, "/")) {
+           cgi = NULL;
+       }
     }
     if (cgi) {
        mode = conf->cgi_root_mode;