Menu

FakeLockRequests

Adam Tauno Williams

WebDAV

Faking Lock & UNLOCK Requests

Perform a LOCK request on a project document.

curl --verbose -u awilliam:fred123 -X LOCK -H 'Timeout: Second-3600' \
  -d '<?xml version="1.0" encoding="utf-8" ?>
      <D:lockinfo xmlns:D="DAV:">
        <D:lockscope><D:exclusive/></D:lockscope>
        <D:locktype><D:write/></D:locktype>
        <D:owner><D:href>awilliam</D:href></D:owner>
     </D:lockinfo>' http://127.0.0.1:8080/dav/Projects/test123/Documents/ComericaPositivePayIn.yaml

Unlock the project documenmt

curl --verbose -u awilliam:fred123 -X UNLOCK \
  -H 'Lock-Token: <opaquelocktoken:08e7b8a645c7423eb4ddccd0fec80fc2>' \
  http://127.0.0.1:8080/dav/Projects/test123/Documents/ComericaPositivePayIn.yaml

Response will be an empty 204.


Related

Wiki: WebDAV

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.