ring

Tim Robinson 2020-12-22T10:08:58.034700Z

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?

Tim Robinson 2020-12-22T12:44:05.035200Z

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"!