TheProjecter / sardine

Automatically exported from code.google.com/p/sardine
0 stars 0 forks source link

delete() method deletes non empty folder #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1.What steps will reproduce the problem?

Invoke delete() command with non-empty folder in the URL

eg : sardine.delete("http://localhost/webdav/folder1/"); 

2.What is the expected output? What do you see instead?

entire "/folder1" gets deleted.
I assume non empty folders should not be deleted.

3.What version of the product are you using?

sardine-314

4.On what operating system?

Mint Linux

5.What webdav server are you hitting?

Apache2 with webdav module

Original issue reported on code.google.com by umanga....@gmail.com on 15 Mar 2013 at 1:29

GoogleCodeExporter commented 9 years ago
This is expected behaviour. Quoting RFC:

The DELETE method on a collection MUST act as if a "Depth: infinity"
   header was used on it.  A client MUST NOT submit a Depth header with
   a DELETE on a collection with any value but infinity.

   DELETE instructs that the collection specified in the Request-URI and
   all resources identified by its internal member URIs are to be
   deleted.

Original comment by dkocher@sudo.ch on 18 Apr 2013 at 8:21