From d7c5192b723b4d696da100f8110e079fdc8b3660 Mon Sep 17 00:00:00 2001 From: Adrien Castex Date: Sat, 13 May 2017 16:05:21 +0200 Subject: [PATCH] Changed HTTP status when the resource cannot be read --- lib/server/commands/Get.js | 2 +- src/server/commands/Get.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server/commands/Get.js b/lib/server/commands/Get.js index 5c2cbe41..de2be3e0 100644 --- a/lib/server/commands/Get.js +++ b/lib/server/commands/Get.js @@ -10,7 +10,7 @@ function default_1(arg, callback) { } r.read(function (e, c) { if (e) - arg.setCode(WebDAVRequest_1.HTTPCodes.NotFound); + arg.setCode(WebDAVRequest_1.HTTPCodes.MethodNotAllowed); else { arg.setCode(WebDAVRequest_1.HTTPCodes.OK); var content = c; diff --git a/src/server/commands/Get.ts b/src/server/commands/Get.ts index a7b94ffa..4a523255 100644 --- a/src/server/commands/Get.ts +++ b/src/server/commands/Get.ts @@ -13,7 +13,7 @@ export default function(arg : MethodCallArgs, callback) r.read((e, c) => { if(e) - arg.setCode(HTTPCodes.NotFound) + arg.setCode(HTTPCodes.MethodNotAllowed) else { arg.setCode(HTTPCodes.OK);