Index: trunk/server/common/oursrc/httpdmods/mod_vhost_ldap.c
===================================================================
--- trunk/server/common/oursrc/httpdmods/mod_vhost_ldap.c	(revision 1588)
+++ trunk/server/common/oursrc/httpdmods/mod_vhost_ldap.c	(revision 1589)
@@ -454,4 +454,5 @@
     int sleep;
     struct berval hostnamebv, shostnamebv;
+    int ret = DECLINED;
 
     reqc =
@@ -608,5 +609,4 @@
     cgi = NULL;
 
-#if 0
     if (reqc->cgiroot) {
 	cgi = strstr(r->uri, "cgi-bin/");
@@ -625,10 +625,9 @@
 	  r->handler = "cgi-script";
 	  apr_table_setn(r->notes, "alias-forced-type", r->handler);
+	  ret = OK;
 	}
-#endif
-    /* This is a quick, dirty hack. I should be shot for taking 6.170
-     * this term and being willing to write a quick, dirty hack. */
-    
-    if (strncmp(r->uri, "/~", 2) == 0) {
+    } else if (strncmp(r->uri, "/~", 2) == 0) {
+        /* This is a quick, dirty hack. I should be shot for taking 6.170
+         * this term and being willing to write a quick, dirty hack. */    
 	char *username;
 	uid_t uid = (uid_t)atoll(reqc->uid);
@@ -648,4 +647,5 @@
 	    }
 	    r->filename = apr_pstrcat(r->pool, homedir, "/", USERDIR, r->uri + 2 + strlen(username), NULL);
+	    ret = OK;
 	}
     } else if (r->uri[0] == '/') {
@@ -713,5 +713,5 @@
 
     /* Hack to allow post-processing by other modules (mod_rewrite, mod_alias) */
-    return DECLINED;
+    return ret;
 }
 
