Skip to content

Commit

Permalink
Merge pull request #49 from guzba/master
Browse files Browse the repository at this point in the history
check content-length header for posts
  • Loading branch information
treeform authored Nov 24, 2021
2 parents c9a1cd7 + d896a07 commit db6d7b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/debug_server.nim
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ proc cb(req: Request) {.async.} =
return

if req.url.path == "/post":
await req.respond(Http200, req.body)
if req.headers["Content-Length"] == "":
await req.respond(Http200, "missing content-length header")
else:
await req.respond(Http200, req.body)
return

if req.url.path == "/url":
Expand Down

0 comments on commit db6d7b1

Please sign in to comment.