Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Prevent the Cookie: header being set from within the header map -- on…

…ly the cookies argument should work for this.
  • Loading branch information...
commit 4c32adeaa76b941790b4de3f2eda2460f77bb4a5 1 parent cbbf102
Richard Newman authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/clojure/http/client.clj
View
8 src/clojure/http/client.clj
@@ -112,10 +112,10 @@ by a server."
"GET")))]
(.setRequestMethod connection method)
- (doseq [header (conj default-headers (or headers {}))]
- (.setRequestProperty connection
- (first header)
- (second header)))
+ (doseq [[header value] (conj default-headers (or headers {}))]
+ ;; Treat Cookie specially -- see below.
+ (when (not (= header "Cookie"))
+ (.setRequestProperty connection header value)))
(when (and cookies (not (empty? cookies)))
(.setRequestProperty connection
Please sign in to comment.
Something went wrong with that request. Please try again.