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.

request header key transform to lowercase

See original GitHub issue
let config = {
    method: 'POST',
    headers: {
      'Content-Type':'application/json',
      'JWTs-TOKEN': localStorage.getItem('JWTs-TOKEN'),
      'HHH': 'sdads'
    },
  }

In Chrome 51:

JWTs-TOKEN => jwts-token HHH => hhh

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
calvinbrewercommented, Aug 8, 2016

Same issue here.

Config:

config = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Auth-Token': token,
  }
}

HTTP Request Headers: content-type: application/json auth-token: user

0reactions
matthew-andrewscommented, Sep 15, 2020

It seems this is how headers are supposed to work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do headers convert into lowercase automatically? #71
However, header field names MUST be converted to lowercase prior to their encoding in HTTP/2. A request or response containing uppercase header ......
Read more >
How to prevent of converting header name into lower case
Looks like tomcat container turns the headers to lowercase. Since spring boot uses an embedded tomcat is been affected by it.
Read more >
Headers are getting convert into lower case? | Layer7 API ...
I tried MESSAGE_ID and MESSAGE_TYPE which is being converted in lowercase as i log all request headers in API gateway.
Read more >
HTTP client request headers (lowercase) issue - Google Groups
A recent update changed how client request headers are sent to force all headers to lowercase. This is causing problems with some well-established...
Read more >
servletRequest.getHeaderNames() returns all header names ...
The HTTP specification says that HTTP header names are case insensitive. However it would be nice if uppercase header names will be passed...
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