[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-dev
Subject:    Re: autoindex instead of index.html
From:       "William A. Rowe, Jr." <wrowe () covalent ! net>
Date:       2001-09-28 5:17:45
[Download RAW message or body]

Please test with tonight's commit, including some mod_rewrite abuse, and
see if the problem is resolved.

Thanks,

Bill

----- Original Message ----- 
From: "Greg Ames" <gregames@remulak.net>
To: <dev@httpd.apache.org>
Sent: Wednesday, September 26, 2001 1:18 PM
Subject: Re: autoindex instead of index.html


> "William A. Rowe, Jr." wrote:
> > 
> > The actual merge occurs in ap_sub_req_method_uri().  
> 
> Thanks!
> 
> >                  Can you breakpoint and
> > determine what's passed?  This sounds like a vhost's per-dir-config may not
> > be initialized.
> 
> from an earlier post,
> 
> #6  0x08081d1e in ap_sub_req_method_uri (method=0x8094501 "GET",
>     new_file=0x80da88c "index.html", r=0x81091c4, next_filter=0x0)
>     at request.c:1473
> > 
> > I also (reviewing that code) didn't like what I saw...
> > 
> >         udir = ap_make_dirstr_parent(rnew->pool, r->uri);
> >         udir = ap_escape_uri(rnew->pool, udir);    /* re-escape it */
> >         ap_parse_uri(rnew, ap_make_full_path(rnew->pool, udir, new_file));
> > 
> > This means that the new_file is _never_ escaped!!!
> > 
> > The code below might fit -some- situations better...
> > 
> >         udir = ap_make_dirstr_parent(rnew->pool, r->uri);
> >         udir = ap_make_full_path(rnew->pool, udir, new_file);
> >         udir = ap_escape_uri(rnew->pool, udir);    /* re-escape it */
> >         ap_parse_uri(rnew, udir);
> >
> 
> I can play with that and see if it helps.  So ap_make_full_path should
> do Good Stuff for me?  
> 
> what I found in the mean time:  the problem goes away if I disable
> mod_rewrite.  It has a translate hook that is setting the subrequest's
> r->filename to "/index.html" (?huh?!?).  r->canonical_filename remains
> null.  The core's translate phase backs off if it finds r->filename is
> already set.  When mod_rewrite is disabled (i.e. r->filename is null),
> ap_core_translate calls apr_filepath_merge and everything works.  With
> or without mod_rewrite, the subrequest's r->filename is null when we get
> to ap_process_request_internal.
> 
> Greg
> 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic