question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ctx.response.headers.set() going to lowercase

See original GitHub issue

Hey,

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:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kitsonkcommented, Jul 25, 2020

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.

1reaction
n10000kcommented, Jul 24, 2020

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 text
  • Content-Type: image/png will return an image
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found