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.

Documentation: What case do the keys in `request.headers` use?

See original GitHub issue

The API docs page mentions that headers is a dictionary of headers but does not describe the format of the keys. Are they just as the caller specified them, or are they standardised to a particular case (such as first capital, rest lower case)? Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

gojkocommented, Aug 1, 2016

I’ve done some more testing, and the headers are definitely preserved (so my earlier comment on lowercasing is wrong). I’ve implemented a change that adds another field .normalizedHeaders, with header names lowercased.

The field is available to APIs deployed with claudia 1.6.0 (so api builder version is not that important). Here are the release notes:

holyjakcommented, Aug 15, 2016

Thank you! This is really useful when one needs to work with the headers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Key HTTP Response Header Field
The 'Key' header field for HTTP responses allows an origin server to describe the secondary cache key (RFC 7234, Section 4.1) for a...
Read more >
API Headers - What Are They? Examples & More [Explained]
API headers represent the meta-data associated with an API request and response. In other words, they're like an extra source of information for...
Read more >
HTTP headers - GeeksforGeeks
All the headers are case-insensitive, headers fields are separated by colon, key-value pairs in clear-text string format.
Read more >
HTTP/1.1: Header Field Definitions
Accept headers can be used to indicate that the request is specifically limited to a small set of desired types, as in the...
Read more >
HTTP/1.1 Header Casing - Envoy Proxy
When handling HTTP/1.1, Envoy will normalize the header keys to be all lowercase. While this is compliant with the HTTP/1.1 spec, in practice...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found