-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
this.res._headers has changed in node master #903
Comments
I would probably wait until nodejs/node#10805 lands, which will provide more public API functions around accessing HTTP headers (there is a separate PR to deprecate For some use cases though using functions such as the existing |
I can prepare a PR when |
Just a heads up, the PR has landed now in nodejs/node@3e6f103. Additionally, nodejs/node#10941 will re-add |
Koa PR open: #907 |
Code in the master branch still uses |
@ilkkao yes, that would be great! |
I'll send a PR in few days |
released in 2.1.0 and 1.3.0 thank you @ilkkao !! |
Just compiled Node from the master branch and tried to use koa. It failed because the property values in
this.res._headers
are now arrays instead of strings.In Node 7.x,
result
is{ 'content-type': 'foo' }
In Node master (pre-8.0),
result
is{ 'content-type': [ 'Content-Type', 'foo' ] }
The change was made here: nodejs/node@c00e4ad#diff-286202fdbdd74ede6f5f5334b6176b5cR406 (Node PR: nodejs/node#10558)
@mscdex noticed that it broke express and provided a fix https://github.com/jshttp/fresh/pull/20/files Something similar would be needed for koa.
I'll open this issue to make sure this issue is solved for koa in some way.
The text was updated successfully, but these errors were encountered: