Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 10943 invoked from network); 21 Sep 2005 18:37:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Sep 2005 18:37:02 -0000 Received: (qmail 16565 invoked by uid 500); 21 Sep 2005 18:36:57 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 16517 invoked by uid 500); 21 Sep 2005 18:36:57 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 16503 invoked by uid 99); 21 Sep 2005 18:36:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2005 11:36:56 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [206.47.199.165] (HELO simmts7-srv.bellnexxia.net) (206.47.199.165) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2005 11:37:04 -0700 Received: from [192.168.0.4] ([65.94.97.239]) by simmts7-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050921183631.FTRA23474.simmts7-srv.bellnexxia.net@[192.168.0.4]>; Wed, 21 Sep 2005 14:36:31 -0400 Message-ID: <4331A80F.2090503@pearsoncmg.com> Date: Wed, 21 Sep 2005 14:35:59 -0400 From: Chris Darroch Organization: Pearson CMG User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050721 X-Accept-Language: en-ca, en-us MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: mod_dir + caching brokenness References: <20050921162749.GA29256@stdlib.net> In-Reply-To: <20050921162749.GA29256@stdlib.net> X-Enigmail-Version: 0.91.0.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Colm: > 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/index.bar/, redirects, then request for /foo/index.bar/ finds /foo/index.bar/index.html 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". :-) Chris. -- GPG Key ID: 366A375B GPG Key Fingerprint: 485E 5041 17E1 E2BB C263 E4DE C8E3 FA36 366A 375B