dakrone/clj-http — pull request #25 by scusack (2011-12-07 05:56:10+00:00)
Title: change to core/parse-headers to handle multiple headers with the same name

I was using clj-http to download some web pages, some of which required logging in, which in turn dropped a number of cookies. I noticed that only the last cookie was ever kept and found the problem in parse-headers.

From inspecting the code it appears that `wrap-cookie` is expecting the set-cookie header to be either a string or a seq of strings. I changed parse-headers so that when multiple headers with the same name are found that they are collected into a vector, otherwise just the single string value is returned.

I've added a test to test-core too.