W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > April to June 1999

Fun with Moves and Copy

From: Kevin Wiggen <wiggs@wiggenout.com>
Date: Thu, 15 Apr 1999 01:25:36 -0700
Message-ID: <009501be8719$8c33f4e0$62c766d8@pacbell.net>
To: <w3c-dist-auth@w3.org>
I asked this once before and no one jumped on my bandwagon, so I left it alone....

However after playing with the IE release I will bring it back up   :)

I am concerned by the Spec section 8.9.3 and 8.8.4

"If the resource exists at the destination and the Overwrite header is "T" then prior to performing the move the server MUST perform a DELETE with "Depth: infinity" on the destination resource."

Wow that's a STRONG statement.

If you point a IE browser at a webdav server (or if you play webdav server in your spare time), and you do a MOVE to a directory that already exists:

IE  =>  MOVE http://foo/bar  to http://foo/fee/bar Overwrite = F
I respond => 412 Precondition Failed
IE  displays to user :

This folder already contains a folder named 'bar'.

If the files in the existing folder have the same name as files in the folder you are moving, they will be replaced.  Do you still want to move the folder?

If I say yes
IE  =>  MOVE http://foo/bar to http://foo/fee/bar Overwrite = T

Hang on a second...  Where is the big message saying "ALL INFO IN THE DESTINATION FOLDER WILL BE LOST"

Now granted IE does not do everything correctly when it comes to move (again if I am wrong here please tell me, I am simply playing server).  If I give IE a 207 response telling it that some subdirectory didn't move because 412 Precondition Failed, IE assumes the whole move failed.  Which means my display in IE is screwed up and allows me to ask for directories that no longer exist....  So it seems that the only responses to MOVE and COPY are succeeded or failed.   

But back to the BIG DELETE problem, what happens if the big delete fails for some reason???  What is the error code there?  Do I still do a MOVE???  

Go through that scenario

IE => MOVE http://foo/bar to http://foo/fee/bar Overwrite = T

My server sees that http://foo/fee/bar exists, therefore does a DELETE with Depth Infinity.  BUT that command gives back a 207 saying that some downwind resource was Locked by someone else or something.  Therefore the entire directory tree WAS NOT deleted, and a skeleton still remains.

What do I do then??

1)  Fail the Move, give IE a 412 or something.  But somehow tell IE "and o yea I didn't do the move, but blew away everything I could at the destination", unless I can rollback the delete somehow.

2)  Try to do the Move, and only move the things that I can.  But if I do that logic, why don't I do this in the first place and not kill off all the data at destination???  I have a overwrite flag to Y therefore I know to actually overwrite.

and what is the alternative for a client if they DON'T want the Move to destroy the directory??  They could call individual Moves for each file I guess, but that could be quite costly.

Also what happens if I have Write permission on a file, and not Delete permission??  If I do the delete first it will fail, and then I will do the write during the move and copy and it will succeed.  That will probably confuse any client...  It seems funny that a Move will act differently when Delete permissions are used.  I am not trying to Delete anything.  So in order to get my desired server feel, I need to set all of my files to NoDelete and everything Writeable...  Try explaining that to a user....

I think that the Kill All feature of DELETE and COPY is wrong and should be changed.  Again, I know of no OS that deletes first (I think, its late).  The move and copy should do what they can without clearing space for themselves...

Sorry if this has been discussed w/out me before and I am just being stupid :)  Also playing webdav server might have made me make some mistakes :)

Received on Thursday, 15 April 1999 04:26:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:19 UTC