httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: directory_walk bug?
Date Thu, 05 Feb 1998 20:21:13 GMT
Dean Gaudet wrote:
> 
> On Thu, 5 Feb 1998, Ben Laurie wrote:
> 
> > Dean Gaudet wrote:
> > >
> > > directory_walk looks like this:
> > >
> > >     test_filename = pstrdup(r->pool, r->filename);
> > >
> > >     if (!os_is_path_absolute(test_filename))
> > >     {
> > >         ...
> > >     }
> > >
> > >     r->filename   = os_canonical_filename(r->pool, r->filename);
> > >     no2slash(test_filename);
> > >     num_dirs = count_dirs(test_filename);
> > >
> > >     ...
> > >
> > > I believe that there's a bug.  I think that test_filename is
> > > probably supposed to be a copy of the r->filename after
> > > the os_canonical_filename.  test_filename is what's actually
> > > used to do all the comparisons later on.
> >
> > Hmmm... if only I could remember which way round it was before we move
> > the os_canonical_filename. However, I'm inclined to agree.
> 
> Well we definately don't want the os_canonical_filename before that if
> block, because that if block is for the proxy.  I just figure that
> it should be something like:
> 
>     if (!os_is_path_absolute(r->filename))
>     {
>         test_filename = pstrdup(r->pool, r->filename);
>         ...
>     }
> 
>     r->filename   = os_canonical_filename(r->pool, r->filename);
>     test_filename = pstrdup(r->pool, r->filename);
>     no2slash(test_filename);

Yeah, that's what I think, too.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Mime
View raw message