Skip to content

Conversation

@marcinjahn
Copy link

The current implementation works well only for HTTP methods that do not support request body. For requests like POST, req's 'close' event fires as soon as request body is read (see expressjs/express#6334 (comment)). I changed it to use res's 'close', which works as expected. "finish" fires before "close", so I added requestFinished flag to avoid cancellation when the request is already processed.

The current implementation works well only for HTTP methods that do not support request body.
For requests like POST, `req`'s 'close' event fires as soon as request body is read (see expressjs/express#6334 (comment)).
I changed it to use `res`'s 'close', which works as expected.
"finish" fires before "close", so I added `requestFinished` flag to avoid cancellation when the request is already processed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant