diff --git a/lib/server.js b/lib/server.js index a990a18..3b808b2 100644 --- a/lib/server.js +++ b/lib/server.js @@ -45,7 +45,7 @@ function request_id() { // the path is resolved and decoded function path_list(pathname) { // remove double and trailing slashes - pathname = pathname.replace(/\/\/+/g, "/").replace(/\/$/, ""); + pathname = pathname.replace(/\/\/+/g, "/").replace(/(.)\/$/, "$1"); var list = pathname.split("/"); list.shift(); for (var i = 0; i < list.length; i++) {