mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Add one to size of line.
To account for newline characters in the original document
This commit is contained in:
@@ -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) ->) ->
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user