apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Kenneth Casson Leighton <l...@samba-tng.org>
Subject Re: [dav-dev] FW: Case-insensitive file system moves
Date Fri, 25 May 2001 23:18:16 GMT
NOTE: :)

the underlying filesystem on NT is *case insensitive*.

most of NT's *published* APIs are redirectors.

i.e. you can provide, sayyy... on the filesystem API,
a Win32 filesystem API, a posix-compliant filesystem API,
whatever-you-like API.

sadly, and _even inside microsoft_, the underlying APIs
are either kept private or not published.

this is to stop developers writing to APIs that may result
in forcing ms to support 'legacy' APIs, even though they
didn't want you to use it in the first place.

so, the point of this message is to let you know that
it _is_ possible to do case-sensitive file access etc.

_however_ this will result in at least two nasty things happening:

1) a file that is named foo and a file named Foo will,
when accessed via explorer.exe or any other program that
uses the Win32 file api, cause massive problems - including
crashing of programs. users will be unable to see one
of the files, or worse, unable to delete one or both of them.

2) if ms decides to remove or change the discouraged API,
well, then apr will break, and people will start bitching.
probably 50% at ms, and 50% at you :)

up to you.

luke

p.s. if you use the posix api on windows, it is very easy
to reproduce 1).

On Fri, May 25, 2001 at 12:26:21PM -0700, Greg Stein wrote:
> On Fri, May 25, 2001 at 01:47:04PM -0500, William A. Rowe, Jr. wrote:
> > From: "Jeff Costlow" <j.costlow@f5.com>
> > Sent: Friday, May 25, 2001 1:32 PM
> > 
> > > > We've encountered a problem with mod_dav that applies only to moving objects
on case-insensitive filesystems (like NT).  I'm
> > pretty sure this has been discussed before, but I don't recall the conclusion.
> > > >
> > > > Try to move a file like this:
> > > > MOVE /file1.html HTTP/1.1
> > > > Host: www.foo.bar
> > > > Destination: http://www.foo.bar/FILE1.html
> > > >
> > > > on NT, this will result in a 403 error returned to the client, because
apache is detecting it as the same resource.
> > > >
> > > > It would be nice if this were to succeed and actually change the name
of the file.  Ideally it would work the same when moving a
> > collection to a new name as well.
> > > > Has anyone looked into mod_dav and thought about changing the code so
that if 2 resources did not strcmp, but were the same
> > resource (according to apache), a rename would actually take place?
> > 
> > That can be done more easily in the upcoming version.
> > 
> > Not every win32 filesystem accepts ren foo FOO, so some of the logic needs to
> > reside somewhere (Apache 2.0's APR) so the rename can proceed foo -> rand ->
FOO.
> 
> Hrm. Interesting point.
> 
> Jeff (Costlow): I'd be happy to apply a patch if you've got one. I looks
> like you would need something in dav_method_copymove(). (not much you could
> do with dav_fs_repos for this issue)
> 
> Cheers,
> -g
> 
> -- 
> Greg Stein, http://www.lyra.org/

Mime
View raw message