-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
doc: DEP0066 is slightly incorrect #37641
Copy link
Copy link
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
📗 API Reference Docs Problem
Location
Affected URL(s):
Description
DEP0066 implies that using
OutgoingMessage.prototype.getHeaderNames()is equivalent to the now deprecatedOutgoingMessage.prototype._headerNamesproperty which is not the case.OutgoingMessage.prototype._headerNamescontains a mapping from lowercase to the exact header names that were sent with the request:Where
OutgoingMessage.prototype.getHeaderNames()returns only lowercase names.The now deprecated
_headerNamesproperty is useful in http debug logging modules that print the exact header names being sent, as some servers are still picky about those. Not having access to the actual header names will make debugging harder, assuming node still sends the headers as they are sent through thehttp.requestmethod.Besides the documentation being misleading about this I'd like to know if there is a way to access the headers being sent going forward, since
_headerNamesis now deprecated.