File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ or the error stream of connection, whichever is appropriate."
6363 " Returns a map of the response headers from connection."
6464 [connection]
6565 (let [hs (.getHeaderFields connection)]
66- (into {} (for [[k v] hs :when k] [k ( first v)]))))
66+ (into {} (for [[k v] hs :when k] [( keyword ( .toLowerCase k)) ( seq v)]))))
6767
6868(defn- parse-cookies
6969 " Returns a map of cookies when given the Set-Cookie string sent
@@ -111,8 +111,8 @@ by a server."
111111 :code (.getResponseCode connection)
112112 :msg (.getResponseMessage connection)
113113 :method method
114- :headers (dissoc headers " Set-Cookie " )
114+ :headers (dissoc headers :set-cookie )
115115 ; ; This correctly implements case-insensitive lookup.
116116 :get-header #(.getHeaderField connection (as-str %))
117- :cookies (parse-cookies (headers " Set-Cookie " ))
117+ :cookies (apply merge ( map parse-cookies (headers :set-cookie ) ))
118118 :url (str (.getURL connection))})))
You can’t perform that action at this time.
0 commit comments