-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Description
h2 compat has a great prop called closed which makes it easy to decide whether it is safe to call writeHead or not. I don't think there is anything corresponding in h1. Would be nice to have though?
You can use headersSent. However, that will not work in the case where the connection was closed before headers were sent. Maybe #15285 would be enough? Not sure?
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.