pillarjs / send

Streaming static file server with Range and conditional-GET support
MIT License
796 stars 188 forks source link

Deprecated res._headers method replaced with Node12 complaint res.getHeaders #184

Closed Doc999tor closed 5 years ago

Doc999tor commented 5 years ago

res._headers causes [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated in Node.js 12 runtime warning Replaced with public res.getHeaders method Links: Node docs, res.hetHeaders

dougwilson commented 5 years ago

So I just ran the rest suite in Node.js 12 and got no deprecation warning with the existing code. This is because res.getHeaderNames exists in Node.js 12 so the branch you are changing is never executed.

I can reopen if you can provide the steps to reproduce the deprecation message and show that it is cause by this module.