httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <>
Subject Re: mod_dir doesn't play nicely with mod_cache, mod_include
Date Wed, 18 Jun 2008 21:30:51 GMT

On 06/18/2008 10:21 PM, Adriano Nagel wrote:
> Hi,
> I think these questions are more appropriate to dev@ than users@,
> sorry if I am wrong.
> I'm using Apache 2.2.8 and have hit two snags concerning mod_dir.
> Accessing http://localhost/ instead of http://localhost/index.html has
> the following effects:
> 1) It bypasses mod_cache (with mod_disk_cache as a backend).

Thats correct. This doesn't work. I guess the following patch might fix

Index: modules/mappers/mod_dir.c
--- modules/mappers/mod_dir.c   (Revision 669255)
+++ modules/mappers/mod_dir.c   (Arbeitskopie)
@@ -180,7 +180,7 @@
              name_ptr = apr_pstrcat(r->pool, name_ptr, "?", r->args, NULL);

-        rr = ap_sub_req_lookup_uri(name_ptr, r, NULL);
+        rr = ap_sub_req_lookup_uri(name_ptr, r, r->output_filters);

          /* The sub request lookup is very liberal, and the core map_to_storage
           * handler will almost always result in HTTP_OK as /foo/index.html

But since this might have remarkable side effects other should have a look on this.

> 2) If mod_include is being used, the contents are transferred using
> chunked encoding, which I think would prevent the page from being
> cached in the first place.

The transfer encoding has nothing to do with the question whether a
contents is cacheable or not. SSI content typically isn't cachable
because it unsets the Last-Modified header. See also



View raw message