dakrone/clj-http — pull request #89 by r0man (2012-08-03 16:23:03+00:00)
Title: Use lower-case header names, as mentioned in the Ring specification.

Hi Lee,

The Ring SPEC says the following about the :headers key in the request
spec:

A Clojure map of downcased header name Strings to corresponding header
value Strings.

When testing HTTP clients built with clj-http against Ring handlers
the network layer is often bypassed by rebinding clj-http.core/request
and forwarding the request directly to the Ring handler. Having upper
case header names causes problems with middleware such as wrap-lint
and application code relying on lower case headers.

Using *always* lower case headers also removes the need for code like
the following example taken from the wrap-decompression middleware.

(or (get-in resp-c [:headers "Content-Encoding"])
(get-in resp-c [:headers "content-encoding"]))

What do you think?

Roman