Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete locks on DELETE method #151

Open
angermueller opened this issue Aug 13, 2016 · 6 comments · May be fixed by #152
Open

Delete locks on DELETE method #151

angermueller opened this issue Aug 13, 2016 · 6 comments · May be fixed by #152

Comments

@angermueller
Copy link

angermueller commented Aug 13, 2016

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

  • LOCK filename.txt -> 204 No content
  • PUT filename.txt with 0 bytes using the lock-token -> 201 Created
  • DELETE filename.txt using the lock-token -> 204 No content
  • PUT filename.txt with content using NO lock-token -> 423 Locked

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
Copy link
Owner

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
Copy link
Author

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

@mikedeboer
Copy link
Owner

(I'm online currently 😄) 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
Copy link
Author

Ok, perfect tipps to get startet :)

@angermueller angermueller linked a pull request Aug 13, 2016 that will close this issue
@angermueller
Copy link
Author

By the way: My first pull request :)

@matthiasg
Copy link

@mikedeboer is there a specific blocking reason to not merge #152 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants