Skip to content

If request method is HEAD don't allow writing body bytes. #47480

Closed
@ronag

Description

@ronag

I've encountered this bug a few times, and it's always confusing and tricky to debug. It would be easier if node did not allow writing bytes to the response body when the request method is HEAD, i.e. throw.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.good first issueIssues that are suitable for first-time contributors.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