-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.stalledIssues and PRs that are stalled.Issues and PRs that are stalled.
Description
Atm, http.OutgoingMessage
has the following headers-related methods:
.setHeader(name, value)
,.getHeader(name, value)
,.removeHeader(name)
.
There probably should be methods to:
- Check if headers were already sent (like
._headerSent
). Clear all headers (if they were not already sent).— Doable withremoveHeader
andgetHeaderNames
/getHeaders
since http: add new functions to OutgoingMessage #10805.List all headers that were set, with values.— Landed in http: add new functions to OutgoingMessage #10805, thanks, @mscdex!
All methods that modify headers should error if the headers were already sent.
Reasoning: https://gist.github.com/ChALkeR/26573ff704f987fd5304
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.stalledIssues and PRs that are stalled.Issues and PRs that are stalled.