File tree Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 2626 :server-name " localhost"
2727 :server-port 18080 })
2828
29- (def request (make-request #' client/request {:using-middleware? true }))
29+ (def request (make-request client/request {:using-middleware? true }))
3030
3131(defn parse-form-params [s]
3232 (->> (str/split (form-decode-str s) #"&" )
Original file line number Diff line number Diff line change 156156 :server-name " localhost"
157157 :server-port 18080 })
158158
159- (def request (make-request #'core/request {:using-middleware? false }))
159+
160+ (def request (make-request core/request {:using-middleware? false }))
161+
162+ (use-fixtures :once
163+ (fn [f]
164+ (binding [client/request (make-request client/request {:using-middleware? true })]
165+ (f ))))
160166
161167(defn slurp-body [req]
162168 (slurp (:body req)))
Original file line number Diff line number Diff line change 2828(defn header-keys
2929 " Returns a set of headers of interest"
3030 [m]
31- (-> (apply dissoc m ignored-headers)
32- (keys )
33- (set )))
31+ (->> (apply dissoc m ignored-headers)
32+ (keys )
33+ (map str/lower-case)
34+ (set )))
3435
3536(defn is-headers=
3637 " Are the two header maps equal?
7172 (.close clj-http-body)
7273 (proxy-super close))))))
7374
74- (do
75- (is (bs/bytes= clj-http-body aleph-body))
76- clj-http-body))
75+ (try
76+ (do
77+ (is (bs/bytes= clj-http-body aleph-body))
78+ clj-http-body)
79+ (catch Exception e
80+ (println " clj-http body class: " (class clj-http-body))
81+ (prn clj-http-body)
82+ (flush )
83+ (throw e))))
7784 (do
7885 (is (= clj-http-body aleph-body))
7986 clj-http-body)))
170177 aleph-resp @(http/request aleph-ring-map)]
171178 (is (= (:status clj-http-resp) (:status aleph-resp)))
172179
180+ (prn aleph-resp)
173181
174182 #_(when (not= (:status clj-http-resp) (:status aleph-resp))
175183 (println " clj-http req:" )
You can’t perform that action at this time.
0 commit comments