ctx.response.headers.set() going to lowercase
See original GitHub issueHey,
ctx.response.headers.set('Authorization', 'foo-bar')
is returning as authorization: foo-bar
For some reason it seems to be converting the string to lowercase?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
node.js - upper case converted to lower case when reading ...
I tested this behaviour in axios and request-promise http client. Why upper case in header key is converted to lowercase in node/express? node....
Read more >HTTP client request headers (lowercase) issue - Google Groups
I see the value in changing incoming headers to lowercase, but it would be better to leave outbound headers alone and allow applications...
Read more >net/http - Go Packages
DefaultMaxHeaderBytes is the maximum permitted size of the headers in an HTTP request. This can be overridden by setting Server.MaxHeaderBytes. View Source
Read more >Go Fiber by Examples: Delving into built-in functions
The value for the Cache-Control HTTP header that is set on the file response. MaxAge is defined in seconds. Next. Type: func(c *Ctx)...
Read more >kong.request - v3.1.x - Kong Docs
request.get_host(). Returns the host component of the request's URL, or the value of the “Host” header. The returned value is normalized to lowercase...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see that two, just because someone posts something on Stack Overflow as an answer doesn’t make it true. I specifically tested against IE11 and had no issue with
content-type
. I suggest you try it yourself as well.Hey @kitsonk,
I understand that the RFC (https://tools.ietf.org/html/rfc7540#section-8.1.2) should be case insensitive, however the issues fall under old embedded browsers which we can’t support.
IE11 as an example, let’s say I do:
Content-type: image/png
will return textContent-Type: image/png
will return an image