Skip to content

Commit

Permalink
Fixed Get method for files with a content equals to null or undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed May 12, 2017
1 parent ddeacd2 commit dc7ff27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/server/commands/Get.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function default_1(arg, callback) {
arg.setCode(WebDAVRequest_1.HTTPCodes.NotFound);
else {
arg.setCode(WebDAVRequest_1.HTTPCodes.OK);
arg.response.write(c);
arg.response.write(c ? c : new Buffer(0));
}
callback();
});
Expand Down
2 changes: 1 addition & 1 deletion src/server/commands/Get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function(arg : MethodCallArgs, callback)
else
{
arg.setCode(HTTPCodes.OK);
arg.response.write(c);
arg.response.write(c ? c : new Buffer(0));
}
callback();
})
Expand Down

0 comments on commit dc7ff27

Please sign in to comment.