Skip to content

http - res.closed #15523

@ronag

Description

@ronag

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

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions