File tree 3 files changed +22
-8
lines changed
3 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 26
26
:server-name " localhost"
27
27
:server-port 18080 })
28
28
29
- (def request (make-request #' client/request {:using-middleware? true }))
29
+ (def request (make-request client/request {:using-middleware? true }))
30
30
31
31
(defn parse-form-params [s]
32
32
(->> (str/split (form-decode-str s) #"&" )
Original file line number Diff line number Diff line change 156
156
:server-name " localhost"
157
157
:server-port 18080 })
158
158
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 ))))
160
166
161
167
(defn slurp-body [req]
162
168
(slurp (:body req)))
Original file line number Diff line number Diff line change 28
28
(defn header-keys
29
29
" Returns a set of headers of interest"
30
30
[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 )))
34
35
35
36
(defn is-headers=
36
37
" Are the two header maps equal?
71
72
(.close clj-http-body)
72
73
(proxy-super close))))))
73
74
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))))
77
84
(do
78
85
(is (= clj-http-body aleph-body))
79
86
clj-http-body)))
170
177
aleph-resp @(http/request aleph-ring-map)]
171
178
(is (= (:status clj-http-resp) (:status aleph-resp)))
172
179
180
+ (prn aleph-resp)
173
181
174
182
#_(when (not= (:status clj-http-resp) (:status aleph-resp))
175
183
(println " clj-http req:" )
You can’t perform that action at this time.
0 commit comments