uWebSockets.js
uWebSockets.js copied to clipboard
Add callback handler to report internal HTTP parsing errors(431, 400, 505)
In order to track all requests in a node.js project, I also want to keep track incoming requests that produce an internal http parsing error (mainly 431 Request Header Fields Too Large). As internal parsing errors result in response being written to the socket and closing the socket, there is no notion of these requests in the application.
By adding a callback handler, the application can be informed of requests that produced an internal error, allowing for an application to keep track of these requests and keep metrics on that.