Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use res.headersSent to detect if the headers have been sent #15

Closed
wants to merge 1 commit into from

Conversation

mcollina
Copy link
Contributor

@sebdeckers found this in nodejs/http2#130.

This PR updates the module so that it uses a public documented property wherever possible.

I do not think this is fully working with the http2 core module, as it is destroying the socket, while you would have to destroy the stream in case of http2. We will address that later on.

@dougwilson dougwilson self-assigned this May 17, 2017
@dougwilson dougwilson added the pr label May 17, 2017
@dougwilson
Copy link
Contributor

Nice, thanks @mcollina ! Not sure how I missed the use of res._headers in this module during the Express 4.15 release. I'll land this in the next minor for Express 4.16 👍

@mcollina
Copy link
Contributor Author

I'm wondering how @sebdeckers found it too :D.

@sebdeckers
Copy link

@mcollina 🕵️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants