httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@hyperreal.com>
Subject Something strange going on in indexes (0.8.10-11) (fwd)
Date Wed, 30 Aug 1995 18:40:40 GMT
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 <torppa@walrus.megabaud.fi>
> Message-Id: <199508291818.VAA12109@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;
 }



Mime
View raw message