Invalid HTTP header causes panic
alfreb opened this issue · 1 comments
alfreb commented
Reproduce:
$ echo "Rico, can you handle this?" | nc trident3.vlab.cs.hioa.no 8081
Result on Acorn:
<Server> Responding with index.html.
terminating with uncaught exception of type std::invalid_argument: stoul: no conversion
!!! abort_ex. Why: terminating with uncaught exception of type std::invalid_argument: stoul: no conversion
**** PANIC: ****
terminating with uncaught exception of type std::invalid_argument: stoul: no conversion
Heap end: 0x2c9a000
I think it will suffice to just do a try/catch for each request to the server. Any exception should probably result in a 500 Internal Server Error
RicoAntonioFelix commented
This issue can now be closed since the parser now checks for invalid input.