Hi everyone, I'm just getting started with ring and I'm concerned about case-sensitivity of HTTP headers. Obviously in HTTP, header names are case-insensitive but clojure map keys are case-sensitive which doesn't play nice with this. I can see that in an incoming request (using httpkit), all the keys are lower case. Do we have a convention that all ring middleware and handlers only ever use lower-case headers, or are there special rules I need to abide by make sure I process headers in a case-insensitive way?
Some info here: https://github.com/ring-clojure/ring/issues/311
Example here from ring-devel where they just use "accept": https://github.com/ring-clojure/ring/blob/ae6a42108286ca95f33e2d9d6f33172ae7233730/ring-devel/src/ring/middleware/stacktrace.clj#L87
You can also use ring.util.response/*get-header*
: https://github.com/ring-clojure/ring/blob/ae6a42108286ca95f33e2d9d6f33172ae7233730/ring-core/src/ring/util/response.clj#L195
OK Thanks. I have just found in here "https://github.com/ring-clojure/ring/blob/master/SPEC" it says "A Clojure map of downcased header name Strings" so I guess I can rely on them being in lower case in the original request at least. (I was googling for "lowercase" and "lower case" but didn't think of looking for "downcase"!