You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ha...@hyperreal.com> on 1995/08/30 20:40:40 UTC

Something strange going on in indexes (0.8.10-11) (fwd)

Forwarded message:
> From torppa@walrus.megabaud.fi  Tue Aug 29 11:19:00 1995
> Date: Tue, 29 Aug 1995 21:18:53 +0300
> From: Jarkko Torppa <to...@walrus.megabaud.fi>
> Message-Id: <19...@walrus.megabaud.fi>
> To: apache-bugs@mail.apache.org
> Subject: Something strange going on in indexes (0.8.10-11)
> 
> 
> Directory indices failed to work for me, either IgnoreIndex as distributed
> is totally wrong or the code is wrong.
> 
> Here is a ugly patch I made to fix the situation. Has been running
> here for 16minutes now.
> 

--- mod_dir.c.org	Wed Aug 23 04:16:21 1995
+++ mod_dir.c	Tue Aug 29 21:11:11 1995
@@ -367,14 +367,26 @@
 int ignore_entry(dir_config_rec *d, char *path) {
     array_header *list = d->ign_list;
     struct item *items = (struct item *)list->elts;
+    char *tt;
     int i;
 
+    if((tt=strrchr(path,'/')) == NULL)
+      tt=path;
+    else {
+      tt++;
+    }
+
     for (i = 0; i < list->nelts; ++i) {
         struct item *p = &items[i];
-	
-        if(!strcmp_match(path,p->apply_path))
-            if(!strcmp_match(path,p->apply_to))
-                return 1;
+	char *ap;
+
+	if((ap=strrchr(p->apply_to,'/')) == NULL)
+	  ap=p->apply_to;
+	else
+	  ap++;
+
+        if(!strcmp_match(path,p->apply_path) && !strcmp_match(tt,ap))
+	   return 1;
     }
     return 0;
 }