We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproduce with
import options, asyncdispatch import httpbeast proc onRequest(req: Request): Future[void] = if req.httpMethod == some(HttpPost): case req.path.get() of "/": req.send("Hello World") else: req.send(Http404) run(onRequest)
Then send a faulty HTTP request with:
curl -v -XPOST http://127.0.0.1:8080/ -d/etc/services -H "Content-Length: 12"
Results in:
httpbeast.nim(421) run httpbeast.nim(414) run httpbeast.nim(287) eventLoop httpbeast.nim(203) processEvents httpbeast.nim(140) bodyInTransit system.nim(3877) failedAssertImpl system.nim(3870) raiseAssert system.nim(2916) sysFatal Error: unhandled exception: /home/idoornekamp/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(140, 9) `not trueLen < bodyLen` [AssertionError]```
IMHO asserting or throwing on faulty remote data is not right here.
The text was updated successfully, but these errors were encountered:
Indeed :)
This is why you should put nginx in front of httpbeast, for now at least.
We need to properly fuzz httpbeast and fix these issues, with hopefully as little performance regressions as possible.
Sorry, something went wrong.
No branches or pull requests
Reproduce with
Then send a faulty HTTP request with:
Results in:
IMHO asserting or throwing on faulty remote data is not right here.
The text was updated successfully, but these errors were encountered: