httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: [BUG] Win32 assert: sub_canonical_filename() called with szFile==""
Date Tue, 14 Jul 1998 19:54:58 GMT
On Tue, 14 Jul 1998, Marc Slemko wrote:

> At the moment, if you try a "<Directory c:/>" or "<Directory />" it barfs
> with an assert because it strips the trailing '/'.
> If you fix the code so it doesn't strip tailing '/'s in that case, then
> the sections just don't appear to match anything.  Obviously, there is
> some other bug in there.  I think that not stripping the trailing '/'s off
> such entries is the right thing to do, but it is academic at this point
> because someone has to go through all the steps to see why it doesn't work
> and what needs to be done to make it work.  But not for 1.3.1.

Yeah. It strikes me that os_canonical_filename() is problematic. 
Especially the whole deal with sub_canonical_filename(). It strikes me
that os_canonical_filename() is called (I'm ignoring the calls that
canonicalize configuration directives for now) in directory_walk(), just
before it... well... walks through the directories. I'm thinking it might
be a better idea to remove all the directory-munging stuff from
os_canonical_filename(), because directory_walk() does it too, and replace
it with a os_canonical_path(char *path, char *file), where path is a
pathname that's already canonicalized except for the last part, which file
points to. directory_walk() can call this as it goes through each path
section, and the canonicalization work gets done for free.

And it won't mess with path info, because directory_walk is also where we
determine what path_info is, and it doesn't try to walk there.


-- Alexei Kosut <> <>
   Stanford University, Class of 2001 * Apache <> *

View raw message