From 8ddfbb99de1609a3e57f2dc4b45b2f64015c540f Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 25 Nov 2015 17:01:19 +0000 Subject: [PATCH] Only parse body when we need to for copyFile request --- services/filestore/app.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/filestore/app.coffee b/services/filestore/app.coffee index 5df7c76fc8..e78355f4e6 100644 --- a/services/filestore/app.coffee +++ b/services/filestore/app.coffee @@ -17,7 +17,6 @@ Metrics.event_loop?.monitor(logger) Metrics.memory.monitor(logger) app.configure -> - app.use express.bodyParser() app.use Metrics.http.monitor(logger) app.configure 'development', -> @@ -72,7 +71,7 @@ app.use (req, res, 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.put "/project/:project_id/file/:file_id", keyBuilder.userFileKey, express.bodyParser(), fileController.copyFile app.del "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.deleteFile app.get "/template/:template_id/v/:version/:format", keyBuilder.templateFileKey, fileController.getFile @@ -83,7 +82,7 @@ app.post "/template/:template_id/v/:version/:format", keyBuilder.templateFileKey app.get "/project/:project_id/public/:public_file_id", keyBuilder.publicFileKey, fileController.getFile app.post "/project/:project_id/public/:public_file_id", keyBuilder.publicFileKey, fileController.insertFile -app.put "/project/:project_id/public/:public_file_id", keyBuilder.publicFileKey, fileController.copyFile +app.put "/project/:project_id/public/:public_file_id", keyBuilder.publicFileKey, express.bodyParser(), fileController.copyFile app.del "/project/:project_id/public/:public_file_id", keyBuilder.publicFileKey, fileController.deleteFile app.get "/heapdump", (req, res)->