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

Thrown error in writeHead when statusMessage exists in http2 #57524

Open
bjohansebas opened this issue Mar 17, 2025 · 1 comment
Open

Thrown error in writeHead when statusMessage exists in http2 #57524

bjohansebas opened this issue Mar 17, 2025 · 1 comment

Comments

@bjohansebas
Copy link
Contributor

When http2 was written in Node.js, from what I've read, it was intended to have a high degree of compatibility with http1, bringing with it warnings such as when using writeHead with statusMessage. I know that at this time having statusMessage is ignored, but maybe it's time to move forward and throw an error instead of just a warning.

Part of this was the expected behavior while explicitly supporting http2 in on-headers in jshttp/on-headers#16.
I understand that this is also a breaking change, so it could be a candidate for Node 25/26.

WDYT?

@bjohansebas
Copy link
Contributor Author

Well, it's actually not necessary to throw an exception, just to disallow it and assume that writeHead will only take two arguments.

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

No branches or pull requests

1 participant