httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm MacCarthaigh <c...@stdlib.net>
Subject mod_dir + caching brokenness
Date Wed, 21 Sep 2005 16:27:49 GMT

mod_dir insists on the indeces being regular files, which breaks with
mod_cache in a particularly nasty way. mod_cache doesn't fill out
rr->finfo for speed reasons, and because it's not always a file that the
cached entity is coming from.

The result is;

	make request for /   		- works   (nothing gets cached)
	make request for /index.html    - works   (gets cached)
	make request for / 		- doesn't work (we fall back to
					  autoindex) as rr->status for
					  the subrequest is 200, but
					  rr->finfo.filetype is not
					  APR_REG.


I'd like to apply this patch, but I have a feeling there must be some
undocumented reason it's not like this already. Any thoughts? 

Index: modules/mappers/mod_dir.c
===================================================================
--- modules/mappers/mod_dir.c   (revision 290728)
+++ modules/mappers/mod_dir.c   (working copy)
@@ -177,11 +177,8 @@
         }

         rr = ap_sub_req_lookup_uri(name_ptr, r, NULL);
-
-        /* XXX: (filetype == APR_REG) - we can't use a non-file index??? */
-        if (   rr->status == HTTP_OK
-            && (   (rr->handler && !strcmp(rr->handler,
             "proxy-server"))
-                || rr->finfo.filetype == APR_REG)) {
+
+        if ( rr->status == HTTP_OK ) {
             ap_internal_fast_redirect(rr, r);
             return OK;
         }


-- 
Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net

Mime
View raw message