diff options
author | Stuart Sierra <mail@stuartsierra.com> | 2009-08-17 17:00:10 -0400 |
---|---|---|
committer | Stuart Sierra <mail@stuartsierra.com> | 2009-08-17 17:00:10 -0400 |
commit | 76a841f9e4f2e184beabe693856572dff265cab7 (patch) | |
tree | c1556efd546728a62a7f637441f53c8e4ed481e2 /src | |
parent | 78637658d879f8859ac6a883e0e0984d63f6ff18 (diff) |
http/agent.clj: fix documentation of 'headers' function
This function uses keywords for header names, not strings.
Diffstat (limited to 'src')
-rw-r--r-- | src/clojure/contrib/http/agent.clj | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clojure/contrib/http/agent.clj b/src/clojure/contrib/http/agent.clj index fe34c98c..d63cfd1e 100644 --- a/src/clojure/contrib/http/agent.clj +++ b/src/clojure/contrib/http/agent.clj @@ -312,9 +312,9 @@ (.getResponseMessage (::connection http-agnt)))) (defn headers - "Returns a String=>String map of HTTP response headers. Header - names are converted to all lower-case. If a header appears more - than once, only the last value is returned." + "Returns a map of HTTP response headers. Header names are converted + to keywords in all lower-case Header values are strings. If a + header appears more than once, only the last value is returned." [http-agnt] (reduce (fn [m [#^String k v]] (assoc m (when k (keyword (.toLowerCase k))) (last v))) |