technomancy / clojure-http-client

An HTTP client for Clojure (DEPRECATED)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

header names should be case-insensitive

tomjack opened this issue · comments

I think HTTP header names are supposed to be case-insensitive. A server I was working with sent "Set-cookie" instead of "Set-Cookie". I changed the header map to use downcased keywords instead of strings, so e.g. (:content-type headers) instead of (headers "Content-Type"). Not sure about what's best to do here since this breaks backwards compatibility. Also, the request header map has string keys, and it seems strange to have string keys there but keyword keys in the response header map.

My backwards incompatible fix is http://github.com/tomo/clojure-http-client/commit/6becb1a805f25ee5a05490b08b56ba750a57c5c8. It might even break something I'm not using in clojure-http-client itself (resourcefully?), not sure.

Closing out all clojure-http-client issues in hopes that folks will switch to clj-http.