httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <grega...@remulak.net>
Subject Re: [PATCH] autoindex instead of index.html
Date Thu, 27 Sep 2001 15:14:27 GMT
"William A. Rowe, Jr." wrote:
> 
> From: "Greg Ames" <gregames@remulak.net>
> Sent: Wednesday, September 26, 2001 3:44 PM
> 
> > Greg Ames wrote:
> > >
> > > Ryan Bloom wrote:
> > > >
> > > > On Tuesday 25 September 2001 03:32 pm, Greg Ames wrote:
> > > >
> > > > Yeah, that should fail.  Why isn't that an absolute path?
> > >
> > > That's the bug.  We're not mapping the subrequest URI into a path in
> > > this case.
> >
> > OK, this takes care of it.  mod_rewrite's translation phase
> > (hook_uri2file) uses r->filename all over the place, and leaves it set
> > even if no rules apply.  A recent change to ap_core_translate  bails out
> > if it's a subrequest and r->filename is already set.  I don't know what
> > the intention of this change was, and I don't plan on rewriting
> > mod_rewrite, but I will test this little patch more thoroughly.
> >
> > Greg
> >
> > Index: server/core.c
> > ===================================================================
> > RCS file: /cvs/apache/httpd-2.0/server/core.c,v
> > retrieving revision 1.61
> > diff -u -d -b -r1.61 core.c
> > --- core.c      2001/09/19 05:52:42     1.61
> > +++ core.c      2001/09/26 20:44:48
> > @@ -2555,8 +2555,6 @@
> >      /* XXX We have already been here, or another module did the work
> >       * for us.  At this moment, we will enable only file subrequests.
> >       */
> > -    if (r->main && r->filename)
> > -        return OK;
> 
> -1 on this patch!!!

Forget it.  Your revision 1.58 patch to core.c broke configurations with
mod_rewrite enabled.  Because of that, I am herebyvetoing your 1.58
patch.  If I find that the server performs more correctly without it, I
will back it out.  If you come up with something else that works with
mod_rewrite in the mean time, great.

> If this is a subrequest, we DON'T WANT TO MUCK THIS UP!  It isn't
> subject to all this remapping.  [Think sub_req_lookup_file.]

huh?  since when are subrequests not subject to URI translation?  That's
where this goes south.
 
> If someone munges filename, then they've broken things. My question is
> what changed that introduced this bug.  

it was your rev. 1.58 patch to core.c.

> And, why rewrite is getting tangled in it. 

mod_rewrite's URI translation phase has been setting r->filename for
subrequests since at least Apache 1.2.  

You tried to give an old API a new meaning.  If you want to pass new
info to ap_core_translate, it would be better if you did it in a way
that won't impact existing modules (new field, hide it in
r->request_config for core, whatever).  But if you must use an old API
in a new way, that's fine, as long as you also change the modules that
use the API, and document the new restriction.  

Greg

Mime
View raw message