Skip to content

Commit

Permalink
Fixed the 'LOCK' method which needed the 'owner' in the lock properti…
Browse files Browse the repository at this point in the history
…es (which was made optional in the past)
  • Loading branch information
AdrienCastex committed Jul 15, 2017
1 parent 7690933 commit 21a4a94
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/server/commands/Lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ function createResponse(arg, lock) {
activelock.ele('D:locktoken').ele('D:href', undefined, true).add(lock.uuid);
activelock.ele('D:lockroot').add(arg.fullUri());
activelock.ele('D:depth').add('infinity');
activelock.ele('D:owner').add(lock.owner);
if (lock.owner)
activelock.ele('D:owner').add(lock.owner);
activelock.ele('D:timeout').add('Second-' + lock.lockKind.timeout);
return prop;
}
Expand Down
3 changes: 2 additions & 1 deletion lib/server/v2/commands/Lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function createResponse(ctx, lock) {
activelock.ele('D:locktoken').ele('D:href', undefined, true).add(lock.uuid);
activelock.ele('D:lockroot').ele('D:href', undefined, true).add(encodeURI(ctx.fullUri()));
activelock.ele('D:depth').add(lock.depth === -1 ? 'infinity' : lock.depth.toString());
activelock.ele('D:owner').add(lock.owner);
if (lock.owner)
activelock.ele('D:owner').add(lock.owner);
activelock.ele('D:timeout').add('Second-' + lock.lockKind.timeout);
return prop;
}
Expand Down
3 changes: 2 additions & 1 deletion src/server/commands/Lock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ function createResponse(arg : MethodCallArgs, lock : Lock)
activelock.ele('D:locktoken').ele('D:href', undefined, true).add(lock.uuid);
activelock.ele('D:lockroot').add(arg.fullUri());
activelock.ele('D:depth').add('infinity');
activelock.ele('D:owner').add(lock.owner);
if(lock.owner)
activelock.ele('D:owner').add(lock.owner);
activelock.ele('D:timeout').add('Second-' + lock.lockKind.timeout);

return prop;
Expand Down
3 changes: 2 additions & 1 deletion src/server/v2/commands/Lock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ function createResponse(ctx : HTTPRequestContext, lock : Lock)
activelock.ele('D:locktoken').ele('D:href', undefined, true).add(lock.uuid);
activelock.ele('D:lockroot').ele('D:href', undefined, true).add(encodeURI(ctx.fullUri()));
activelock.ele('D:depth').add(lock.depth === -1 ? 'infinity' : lock.depth.toString());
activelock.ele('D:owner').add(lock.owner);
if(lock.owner)
activelock.ele('D:owner').add(lock.owner);
activelock.ele('D:timeout').add('Second-' + lock.lockKind.timeout);

return prop;
Expand Down

0 comments on commit 21a4a94

Please sign in to comment.