From e8e2338c0cafa212782329cffdf48c089063d411 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 5 Jan 2015 16:56:19 +0000 Subject: [PATCH] move connection:close middleware ahead of other routes --- services/filestore/app.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/filestore/app.coffee b/services/filestore/app.coffee index f2b4c405be..9a1bfc7ef9 100644 --- a/services/filestore/app.coffee +++ b/services/filestore/app.coffee @@ -61,15 +61,15 @@ app.use (req, res, next) -> logger.err err: exception, "exception in request domain handler" requestDomain.run next -app.get "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.getFile -app.post "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.insertFile - app.use (req, res, next) -> if not appIsOk # when shutting down, close any HTTP keep-alive connections res.set 'Connection', 'close' next() +app.get "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.getFile +app.post "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.insertFile + app.put "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.copyFile app.del "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.deleteFile