From 5f8da42b52613892c29c677f80f1fb1479c45179 Mon Sep 17 00:00:00 2001 From: Raghu Date: Thu, 10 Dec 2015 12:23:25 +0530 Subject: [PATCH] Change to remove backslash Removing '\' that appears in filepath.This results in No Such Key error. --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index ffbce84..ff5a586 100644 --- a/index.js +++ b/index.js @@ -63,6 +63,7 @@ module.exports.prototype.handle = function(ctx, next) { // remove the first / filepath = path.normalize(decodeURIComponent(ctx.url)), filepath = filepath[0] == '/' ? filepath.substr(1) : filepath, + filepath = filepath[0] == '\\' ? filepath.substr(1) : filepath, filepath = filepath[filepath.length] == '/' ? filepath.substr(0, -1) : filepath, payload = null, domain = {