Skip to content

Thrown error in writeHead when statusMessage exists in http2Β #57524

@bjohansebas

Description

@bjohansebas

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussIssues opened for discussions and feedbacks.http2Issues or PRs related to the http2 subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions