From ea761419ad10c440bb8f0bd29dffa4116edca5f6 Mon Sep 17 00:00:00 2001 From: Zed Date: Sat, 6 Jun 2020 12:20:11 +0200 Subject: [PATCH] Fix asynchttpserver newline breaking content-length (#14565) [backport] --- lib/pure/asynchttpserver.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pure/asynchttpserver.nim b/lib/pure/asynchttpserver.nim index 7fbbf38ea3..afd452b015 100644 --- a/lib/pure/asynchttpserver.nim +++ b/lib/pure/asynchttpserver.nim @@ -105,8 +105,9 @@ proc respond*(req: Request, code: HttpCode, content: string, msg.add("Content-Length: ") # this particular way saves allocations: msg.addInt content.len - - msg.add "\c\L\c\L" + msg.add "\c\L" + + msg.add "\c\L" msg.add(content) result = req.client.send(msg)