node-restify
node-restify copied to clipboard
Usage of OutgoingMessage._headers is deprecated
https://github.com/restify/node-restify/blob/9153587c023a876237c1d8bc7491fee4984d9074/lib/response.js#L410
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?