Skip to content

Commit

Permalink
Changed HTTP status when the resource cannot be read
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed May 13, 2017
1 parent fa90936 commit d7c5192
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 @@ -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;
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 @@ -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);
Expand Down

0 comments on commit d7c5192

Please sign in to comment.