httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Canonical names - what are they?
Date Sat, 14 Oct 2000 07:20:37 GMT

Based on my inability to edit the recipient of an email message 
- tonight isn't the night I'm commiting code.

Here's a brain teaser for you all... what is a canonical file name?

Unix believes they are the given name.  canonical(p,n) = n.

OS2 believes they aught to be absolute-pathed, Win32 doesn't.

I'm about to finish the port to apr of everything left over in os.h.
The os.h, os_inline.c and util_os.c all need to die now.

I'm not happy keeping 'canonical' as our identifier unless we agree
-what- it is, and -why-.  I'm expecting we actually need several
different families:

make_abspath + is_abspath
make_relpath + is_relpath

these would always knock out redundant slashes, backdirs, thisdirs,
and the like, taking special precautions for things like win32 trailing
.'s and wildcards.  I'm almost thinking of a single call that would
offer flags such as ALLOW_WILDCARDS, MATCH_TRUECASE and FORCE_TRUECASE.
It will also return a pointer where it stops parsing for resolution
of the things that didn't exist.

Whatever we do, we have to stop testing two, three, four times over
the same path name.  Once a path is resolved, it should stay that way.

If noone has any feedback I'll be hacking this out over the next several
days.  I'll identify all the goofy places that mod_include, mod_userdir
and others play filename games they shouldn't have to understand.  I'll
put together the api and offer the patch to the actual Apache core and
modules, and then implement the apr for unix/win32/os2 - but it's up to
the platform folks to rip on it.

If you have feedback, complaints or suggestions please offer them up
before I invest the energy to pound this out.

Bill

Mime
View raw message