diff options
author | Zed <zedeus@pm.me> | 2020-06-06 12:20:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-06 12:20:11 +0200 |
commit | ea761419ad10c440bb8f0bd29dffa4116edca5f6 (patch) | |
tree | b80d91284dfc0b9c16ca7deb3d65061efa90ec63 /lib/pure/asynchttpserver.nim | |
parent | d573581eb72997e27d91dac82b860964ed706590 (diff) | |
download | Nim-ea761419ad10c440bb8f0bd29dffa4116edca5f6.tar.gz |
Fix asynchttpserver newline breaking content-length (#14565) [backport]
Diffstat (limited to 'lib/pure/asynchttpserver.nim')
-rw-r--r-- | lib/pure/asynchttpserver.nim | 5 |
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) |