Fix asynchttpserver newline breaking content-length (#14565) [backport]
This commit is contained in:
parent
d573581eb7
commit
ea761419ad
1 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue