httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <p...@ukweb.com>
Subject Re: Spaces in Win32 executable names
Date Fri, 22 Aug 1997 08:34:33 GMT
On Thu, 21 Aug 1997, Ben Laurie wrote:
> Well, I finally got VC++ 5 to debug Apache (I had to set the working
> directory to ...\apachen\CoreD, or it complained that it couldn't find
> ApacheCore.dll [which is not what the manual sez]), to look into the
> spaces in executables thing.

Heh, I can never get that to work in 4.2 or 5.0. Even if the full path to
the DLL was added to the "extra DLLs" section in the debug configuration. 

> BTW, the reason I was doing this at all was testing name
> canonicalisation on CGIs. The result is this (on a request of
> .../scripts/copy_o~1.bat):
> 
> SCRIPT_FILENAME=c:/apachetest/scripts/copy_of_t1.bat
> REQUEST_URI=/scripts/copy_o~1.bat
> SCRIPT_NAME=/scripts/copy_o~1.bat

I wonder if trying to expand filenames is really the right thing to do. 
Couldn't we just convert all filenames to short form and *always* work
internally with the short form? So the first stage of parsing <Directive
...>, ScriptAlias ... etc is to munge the filename or path to a short
form. And when a request URI is transformed to a filename also convert it
to a short form. 

I am getting worried about the amount of effort required to ensure that
things like security checks will work when there are multiple possible
pathnames for the same directory or resource.

In OS abstraction terms we'd just define something like ap_map_path() 
which does nothing on Unix, maps to lowercase on OS/2, and does a
GetShortPathName() on Win32 (and probably maps to lowercase as well, and
maybe adds a drive letter to ensure it is fully-qualified). 

//pcs




Mime
View raw message