Server crashes with empty request
ire4ever1190 opened this issue · 1 comments
ire4ever1190 commented
Stack Trace
/home/user/.nimble/pkgs/httpx-0.2.4/httpx.nim(559) run
/home/user/.nimble/pkgs/httpx-0.2.4/httpx.nim(549) run
/home/user/.nimble/pkgs/httpx-0.2.4/httpx.nim(438) eventLoop
/home/user/.nimble/pkgs/httpx-0.2.4/httpx.nim(221) processEvents
/home/user/.choosenim/toolchains/nim-#devel/lib/system.nim(2633) []
/home/user/.choosenim/toolchains/nim-#devel/lib/system/fatal.nim(53) sysFatal
Error: unhandled exception: index -1 not in 0 .. 1 [IndexDefect]
Steps to reproduce
- open connection to server with telnet
- hit enter without typing anything else in
Can also crash server by sending an invalid request with telnet (it properly responds with 501 error but then crashes)
ire4ever1190 commented
Apologies, the error was in my code and not yours
I pulled a small brain maneuver and tried to access the path before checking if it was nil