Fix validateLock being called more than once #93

Merged
merged 1 commit into from Apr 11, 2014

Conversation

Projects
None yet
2 participants
Contributor

bancek commented Jan 16, 2014

Node crashes if locked file is locked again.

Error: Can't render headers after they are sent to the client.

How to reproduce:

node examples/fileserver.js
curl localhost:8000/1.txt -X LOCK -H "Content-type: text/xml" -d '<?xml version="1.0"?><A:lockinfo xmlns:A="DAV:"><A:locktype><A:write/></A:locktype><A:lockscope><A:shared/></A:lockscope><A:owner><A:href>CURL</A:href></A:owner></A:lockinfo>'
curl localhost:8000/1.txt -X LOCK -H "Content-type: text/xml" -d '<?xml version="1.0"?><A:lockinfo xmlns:A="DAV:"><A:locktype><A:write/></A:locktype><A:lockscope><A:shared/></A:lockscope><A:owner><A:href>CURL</A:href></A:owner></A:lockinfo>'
Owner

mikedeboer commented Apr 11, 2014

Thanks for tracking this down!

mikedeboer added a commit that referenced this pull request Apr 11, 2014

Merge pull request #93 from bancek/upstream
Fix validateLock being called more than once

@mikedeboer mikedeboer merged commit 3686602 into mikedeboer:master Apr 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment