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

Lower-casing of HTTP headers #1132

Closed
Eric24 opened this issue Feb 2, 2018 · 1 comment
Closed

Lower-casing of HTTP headers #1132

Eric24 opened this issue Feb 2, 2018 · 1 comment

Comments

@Eric24
Copy link

Eric24 commented Feb 2, 2018

Does koa actively force received HTTP headers to lower case? By the time I see the contents of ctx.request.header, they are lower-case, but I couldn't find anything in the docs that says koa is doing this. If it is, is there a way to get access to the "raw/unmodified" headers?

@dead-horse
Copy link
Member

dead-horse commented Feb 3, 2018

it is converted to lowercase by node, and you can access the raw headers by ctx.req.rawHeaders. Read node's documents to get more information.

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

2 participants