diff --git a/lib/server/commands/Get.js b/lib/server/commands/Get.js index 7c7c1152..45c25618 100644 --- a/lib/server/commands/Get.js +++ b/lib/server/commands/Get.js @@ -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(); }); diff --git a/src/server/commands/Get.ts b/src/server/commands/Get.ts index 656ab088..eeeac91d 100644 --- a/src/server/commands/Get.ts +++ b/src/server/commands/Get.ts @@ -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(); })