-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for Node.js 12 #64
Conversation
this._headers = this.response._headers = this.response._headers || {}; | ||
|
||
// Patch to node core | ||
this.response._headerNames = this.response._headerNames || {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this not be in the catch, but in another try-catch?
// Patch to node core
try {
this.response._headerNames = this.response.getHeaderNames() || {};
} catch (err) {
this.response._headerNames = this.response._headerNames || {};
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been commented in PR #77 that there is no need for this suggestion.
@darrendatbui has did some testing and the original committed code works.
I rest my case.
When can we expect this patch to be published? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include @peteriman suggestion
@Xmader Mind making the suggested changes? |
ping? |
This fixes issue #68. This will supersede PR #71 and PR #77; these 2 PRs can be closed. Ping @indexzero @jcrugzz |
Appreciate everyone trying to keep this code alive |
https://nodejs.org/api/deprecations.html#deprecations_dep0066_outgoingmessage_prototype_headers_outgoingmessage_prototype_headernames