Skip to content
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

ctx.headers returns values are array inside array #29

Open
rde2 opened this issue Sep 17, 2019 · 0 comments
Open

ctx.headers returns values are array inside array #29

rde2 opened this issue Sep 17, 2019 · 0 comments

Comments

@rde2
Copy link

rde2 commented Sep 17, 2019

In the node.js fn handler, the ctx parameter headers property returns:

get headers () {
let headers = {}
for (let k in this._headers) {
if (this._headers.hasOwnProperty(k)) {
headers[k] = new Array(this._headers[k])
}
}
return headers
}
However _headers[k] is already an array, so to get the value for a header you need:

ctx.headers["Content-type"][0]0] which does not seem right.

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

No branches or pull requests

1 participant