summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorZed <zedeus@pm.me>2020-06-06 12:20:11 +0200
committerGitHub <noreply@github.com>2020-06-06 12:20:11 +0200
commitea761419ad10c440bb8f0bd29dffa4116edca5f6 (patch)
treeb80d91284dfc0b9c16ca7deb3d65061efa90ec63 /lib
parentd573581eb72997e27d91dac82b860964ed706590 (diff)
downloadNim-ea761419ad10c440bb8f0bd29dffa4116edca5f6.tar.gz
Fix asynchttpserver newline breaking content-length (#14565) [backport]
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/asynchttpserver.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pure/asynchttpserver.nim b/lib/pure/asynchttpserver.nim
index 7fbbf38ea..afd452b01 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)