http server returns 400 status code for valid request on keepalive connection after an error was caught by a domain #24953
Labels
domain
Issues and PRs related to the domain subsystem.
help wanted
Issues that need assistance from volunteers or PRs that need help to proceed.
http
Issues or PRs related to the http subsystem.
If an error is thrown while handling a request and then it is caught by an error domain, the second request coming on the same connection is not parsed correctly and the server returns 400 Bad Request.
I managed to reproduce this using a simple example. Server code:
Make the requests:
From what I found, the parser returns a HPE_CB_headers_complete error code. Most probably, the parser's internal state gets messed up or does not get to update when the error is thrown.
The text was updated successfully, but these errors were encountered: