Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 25529 invoked by uid 6000); 27 Dec 1997 17:45:47 -0000 Received: (qmail 25517 invoked from network); 27 Dec 1997 17:45:45 -0000 Received: from eastwood.aldigital.algroup.co.uk (194.128.162.193) by taz.hyperreal.org with SMTP; 27 Dec 1997 17:45:45 -0000 Received: from freeby.ben.algroup.co.uk (freeby.ben.algroup.co.uk [193.133.15.6]) by eastwood.aldigital.algroup.co.uk (8.6.12/8.6.12) with ESMTP id RAA07231; Sat, 27 Dec 1997 17:44:56 GMT Received: from algroup.co.uk (naughty.ben.algroup.co.uk [193.133.15.107]) by freeby.ben.algroup.co.uk (8.6.12/8.6.12) with ESMTP id RAA12801; Sat, 27 Dec 1997 17:44:45 GMT Message-ID: <34A53E7B.DD47E404@algroup.co.uk> Date: Sat, 27 Dec 1997 17:44:27 +0000 From: Ben Laurie Organization: A.L. Digital Ltd. X-Mailer: Mozilla 4.04 [en] (WinNT; I) MIME-Version: 1.0 To: Apache List CC: apache-bugdb@apache.org Subject: [Fwd: os-windows/1558: Alias to other drives gives error 404] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org ben@hyperreal.org wrote: > Synopsis: Alias to other drives gives error 404 > > State-Changed-From-To: feedback-analyzed > State-Changed-By: ben > State-Changed-When: Sat Dec 27 09:21:06 PST 1997 > State-Changed-Why: > Actually, it doesn't work. Nor will "Alias /fred /" on a Unix > box. This is because get_path_info() will strip a leading / > if the path is simply "/" or "x:/". I'm working on a fix. Arg! Fixing this ain't so easy. Firstly, get_path_info() is bugged, as noted above. I stuck this in (at the beginning) in an attempt to fix it: #ifdef WIN32 /* I want to be able to assume that the path has the form x:/stuff, but I'm not sure it is always true. Assert it. [Ben] */ ap_assert(path[1] == ':'); #endif /* Advance over trailing slashes ... NOT part of filename */ for (cp = end; #ifdef WIN32 cp > path+3 #else cp > path+1 #endif && cp[-1] == '/'; --cp) continue; Nasty, huh? So, question one is: can I make the assumption I'm making? Anyway, this half works - it stops the leading / from being stripped. But, weirdly, Win32 returns an error if you try to stat "d:/" (or "d:\"). Huh? What gives? Anyone got any ideas? Also, whilst debugging, I noticed that os_canonical_filename() doesn't work correctly if handed "/". Just thought I'd mention it! 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