From 3d1e6fb28af013b96d769da6c9c37d2fa21c5e89 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 6 Aug 2018 12:00:40 +0100 Subject: [PATCH] increase body parser limit to 64kb the 16kb limit is not enough when the doc has too many escape characters --- services/docstore/app.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/docstore/app.coffee b/services/docstore/app.coffee index f81b4f3ea8..aa6e9bff15 100644 --- a/services/docstore/app.coffee +++ b/services/docstore/app.coffee @@ -31,8 +31,8 @@ app.get '/project/:project_id/doc', HttpController.getAllDocs app.get '/project/:project_id/ranges', HttpController.getAllRanges app.get '/project/:project_id/doc/:doc_id', HttpController.getDoc app.get '/project/:project_id/doc/:doc_id/raw', HttpController.getRawDoc -# Add 16kb overhead for the JSON encoding -app.post '/project/:project_id/doc/:doc_id', bodyParser.json(limit: Settings.max_doc_length + 16 * 1024), HttpController.updateDoc +# Add 64kb overhead for the JSON encoding +app.post '/project/:project_id/doc/:doc_id', bodyParser.json(limit: Settings.max_doc_length + 64 * 1024), HttpController.updateDoc app.del '/project/:project_id/doc/:doc_id', HttpController.deleteDoc app.post '/project/:project_id/archive', HttpController.archiveAllDocs