mikedeboer / jsDAV

jsDAV allows you to easily add WebDAV support to a NodeJS application. jsDAV is meant to cover the entire standard, and attempts to allow integration using an easy to understand API.
http://www.mikedeboer.nl
MIT License
681 stars 159 forks source link

Delete locks on DELETE method #151

Open angermueller opened 8 years ago

angermueller commented 8 years ago

Windows sometimes does the following if you copy a file into a webdav directory:

Of course this causes an error in Windows.

The RFC 4918 says at 9.6 about the DELETE method:

A server processing a successful DELETE request: MUST destroy locks rooted on the deleted resource

So windows behavior not using the lock-token at the last step is correct. JsDAV should delete locks on the DELETE method.

mikedeboer commented 8 years ago

Agreed, this is a bug. I don't know when I'll have time to look into this... a code contribution would be very helpful/ faster here!

angermueller commented 8 years ago

Thanks for the fast reply. I will make a suggestion.

mikedeboer commented 8 years ago

(I'm online currently :smile:) I'd recommend looking at the 'afterDelete' event and hooking that up to the 'locks' plugin. To be super-thorough, the 'afterMove' event would also be interesting to update the lock.

angermueller commented 8 years ago

Ok, perfect tipps to get startet :)

angermueller commented 8 years ago

By the way: My first pull request :)

matthiasg commented 6 years ago

@mikedeboer is there a specific blocking reason to not merge https://github.com/mikedeboer/jsDAV/pull/152 ?