restify / restify/node-restify
Usage of OutgoingMessage._headers is deprecated
Open
@mmarchini is already working on this.
Since Aug 25, 2020.
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 975
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 5
Description
When 'trace'-level logging is enabled, access to self._headers causes a deprecation warning like this:
internal/process/warning.js:132
throw warning;
^
DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
at ServerResponse.__send (/server/node_modules/restify/lib/response.js:410:31)
at ServerResponse.send (/server/node_modules/restify/lib/response.js:316:21)
at emitError (/server/node_modules/restify/lib/server.js:1447:17)
at onResult (/server/node_modules/restify/lib/server.js:1528:20)
at next (/server/node_modules/vasync/lib/vasync.js:843:6)
at emitErrDone (/server/node_modules/restify/lib/server.js:1521:28)
...
name: 'DeprecationWarning',
code: 'DEP0066'
}
Node.js version 12.16.1.
It is especially a headache if throw-on-deprecation is enabled, for example as mocha ... --throw-deprecation
Could this be fixed still for 8.x?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.