-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http: change DEP0066 to a runtime deprecation
Change doc-only deprecation for _headers and _headerNames accessors to a runtime deprecation. PR-URL: #24167 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
- Loading branch information
Showing
5 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
test/parallel/test-http-outgoing-internal-headernames-getter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
|
||
const { OutgoingMessage } = require('http'); | ||
|
||
const warn = 'OutgoingMessage.prototype._headerNames is deprecated'; | ||
common.expectWarning('DeprecationWarning', warn, 'DEP0066'); | ||
|
||
{ | ||
// tests for _headerNames get method | ||
const outgoingMessage = new OutgoingMessage(); | ||
outgoingMessage._headerNames; | ||
} |
15 changes: 15 additions & 0 deletions
15
test/parallel/test-http-outgoing-internal-headernames-setter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
|
||
const { OutgoingMessage } = require('http'); | ||
|
||
const warn = 'OutgoingMessage.prototype._headerNames is deprecated'; | ||
common.expectWarning('DeprecationWarning', warn, 'DEP0066'); | ||
|
||
{ | ||
// tests for _headerNames set method | ||
const outgoingMessage = new OutgoingMessage(); | ||
outgoingMessage._headerNames = { | ||
'x-flow-id': '61bba6c5-28a3-4eab-9241-2ecaa6b6a1fd' | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters