From 41740cbf0ba93fdaded08cb1dc4c13899d9dc534 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Sat, 22 Nov 2014 19:11:41 +0300 Subject: [PATCH] Fixed 404 error when deleting/retrying a task caused by recent change in node's implementation of querystring.unescape. --- lib/nbi.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nbi.coffee b/lib/nbi.coffee index c7490aa..f4db398 100644 --- a/lib/nbi.coffee +++ b/lib/nbi.coffee @@ -244,7 +244,7 @@ listener = (request, response) -> else if TASKS_REGEX.test(urlParts.pathname) r = TASKS_REGEX.exec(urlParts.pathname) taskId = mongodb.ObjectID(querystring.unescape(r[1])) - action = try querystring.unescape(r[2]) + action = r[2] if not action? or action is '/' if request.method == 'DELETE' db.tasksCollection.remove({'_id' : taskId}, (err, removedCount) ->