From a385b6736cc76b94658097fa7f7ae01beb4fba57 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Wed, 3 Jun 2015 18:48:55 +0100 Subject: [PATCH] Fix incorrect 400 reply in asynchttpserver Without the ``continue`` the user's callback will be called but the client would have already been replied to. --- lib/pure/asynchttpserver.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pure/asynchttpserver.nim b/lib/pure/asynchttpserver.nim index 279cedb5d3..9e036443c5 100644 --- a/lib/pure/asynchttpserver.nim +++ b/lib/pure/asynchttpserver.nim @@ -210,6 +210,7 @@ proc processClient(client: AsyncSocket, address: string, var contentLength = 0 if parseInt(request.headers["Content-Length"], contentLength) == 0: await request.respond(Http400, "Bad Request. Invalid Content-Length.") + continue else: request.body = await client.recv(contentLength) assert request.body.len == contentLength