

#3 would be a compromise to keep Apache's current behavior but return a more accurate error code.

#2 is probably closest to what most clients want, but I don't think it is truly correct from a webdav point of view: The Foo resource does actually exist, even though "overwriting" it does not result in the loss of any data. For example, if I have file Foo.txt and collection Bar, then moving Bar to Foo will fail with 404.ġ: Fail with 412 if Overwrite: F was sent succeed if Overwrite: T was sent.Ģ: Succeed whether or not Overwrite: T was sent (on the theory that you're not overwriting anything)ģ: Fail with another 4xx error code such as 409 Conflict.

The general case that causes this problem for me is MOVEing a collection to a destination URL which is only mapped as a result of content-negotiation. The WebDAV WG decided not to try to figure out the right interaction between DAV and content negotiation, so it's probably best to just disable MultiViews on a DAV directory, but Apache's current behavior seems unambiguously wrong.
