spdy-http2 / node-spdy

SPDY server on Node.js
2.81k stars 196 forks source link

Deprecated property in response.js (+ easy fix) #382

Open franz-josef-kaiser opened 3 years ago

franz-josef-kaiser commented 3 years ago

Node version 12 depracated OutgoingMessage.prototype._headers, which is used here in response.js L#18.

The fix is easy: Use getHeaders() instead:

  this.statusCode = statusCode

-   if (this._headers) {
+   if (this.getHeaders()) {
    // Slow-case: when progressive API and header fields are passed.
    if (obj) {

You can inspect the full trace when running node with --trace-deprecation flag.

axelrindle commented 3 years ago

There is already a PR for it, see #367. But there has been no activity for half a year now...

khteh commented 1 year ago

It's been more than a year now. No fix!?!