diff --git a/services/document-updater/app/coffee/HttpController.coffee b/services/document-updater/app/coffee/HttpController.coffee index 9c5eac94e9..ee6359b104 100644 --- a/services/document-updater/app/coffee/HttpController.coffee +++ b/services/document-updater/app/coffee/HttpController.coffee @@ -33,7 +33,7 @@ module.exports = HttpController = _getTotalSizeOfLines: (lines) -> size = 0 for line in lines - size += line.length + size += (line.length + 1) return size setDoc: (req, res, next = (error) ->) -> diff --git a/services/document-updater/test/unit/coffee/HttpController/setDocTests.coffee b/services/document-updater/test/unit/coffee/HttpController/setDocTests.coffee index 9a0176c25d..385b8be044 100644 --- a/services/document-updater/test/unit/coffee/HttpController/setDocTests.coffee +++ b/services/document-updater/test/unit/coffee/HttpController/setDocTests.coffee @@ -70,7 +70,7 @@ describe "HttpController.setDoc", -> describe "when the payload is too large", -> beforeEach -> lines = [] - for _ in [0..300000] + for _ in [0..200000] lines.push "test test test" @req.body.lines = lines @DocumentManager.setDocWithLock = sinon.stub().callsArgWith(5)