Skip to content

Node8 response headers#1376

Merged
retrohacker merged 2 commits into5.xfrom
node8-response-headers
Jun 19, 2017
Merged

Node8 response headers#1376
retrohacker merged 2 commits into5.xfrom
node8-response-headers

Conversation

@retrohacker
Copy link
Contributor

Supersedes #1369

Chris Montoro and others added 2 commits June 9, 2017 01:23
- `res._headers` has been deprecated and accessing it in `auditResponseSerializer` generates exception (RangeError: Maximum call stack size exceeded)
- `res.getHeaders` returns an object that does not inherit from `Object`, so is unsuitable for use here
- falls back to `res._headers` if public APIs (introduced in v7.7.0) do not exist
- see https://nodejs.org/api/deprecations.html#deprecations_dep0066_outgoingmessage_headers_outgoingmessage_headernames
- see https://nodejs.org/api/http.html#http_response_getheaders
@retrohacker
Copy link
Contributor Author

Failing tests are unrelated to PR

@retrohacker retrohacker merged commit 5169db7 into 5.x Jun 19, 2017
@retrohacker retrohacker deleted the node8-response-headers branch June 19, 2017 20:47
@ghost
Copy link

ghost commented Jun 21, 2017

Could we hae this fix also for 4.x?

@avimar
Copy link
Contributor

avimar commented Nov 13, 2017

The upgrade guide looks a little long, I wasn't planning on upgrading yet.
http://restify.com/docs/4to5/

Not that this is the best place to ask, but is there anything more to do to upgrade to 6.x?

AH! Waiting for the change from #1473 to be published.

@retrohacker
Copy link
Contributor Author

Hey @avimar 😄

We use semantic versioning and conventional commits so it should be pretty easy to track what has changed between releases by looking at our commit history on master. https://github.com/restify/node-restify/commits/master

There is a lot to unpack there when moving from 4->5, which is why the migration guide exists, but 5-6 doesn't contain many changes to the API. Most changes were backwards compatible (unless you depended on internals or undocumented behaviour) and the ones that aren't are labeled BREAKING CHANGE in the commit history. Most of the breaking changes for 5->6 were trivial but we erred on the side of caution.

Hope this helps ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants