httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Darroch <>
Subject Re: mod_dir + caching brokenness
Date Wed, 21 Sep 2005 18:35:59 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? 

   As a voice from the wilderness, I for one actually do rely on
the existing ability to redirect to a subdirectory whose name
matches against the list of valid index "files".  For example,
request for /foo/ finds .../foo/, redirects, then
request for /foo/ finds /foo/
and returns that.  Odd, I know, but it's valuable for our purposes.

   This, I believe, requires that mod_dir fall through the
test you're looking at, to the next test:

/* 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)) {
    ap_internal_fast_redirect(rr, r);
    return OK;

/* If the request returned a redirect, propagate it to the client */

if (ap_is_HTTP_REDIRECT(rr->status) ...

   So I don't think your patch changes anything for us (I know you
retracted it, but anyway), because rr->status won't be HTTP_OK when
redirecting to a subdirectory.  Other changes might, though, so
I'll keep an eye on this, and I thought I'd throw in my $0.02 CDN,
in case it helps you and/or anyone else using that particular bit
of existing "functionality".  :-)


GPG Key ID: 366A375B
GPG Key Fingerprint: 485E 5041 17E1 E2BB C263  E4DE C8E3 FA36 366A 375B

View raw message