Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for #26.

Fix based on patch by btatnall.
Response body will always be delivered on response completion.
  • Loading branch information...
commit e040f5cc8fe0e8307b7a24a6f1fe4836026619ba 1 parent dbae286
@neotyk neotyk authored
View
2  src/clj/http/async/client/request.clj
@@ -255,6 +255,8 @@
onCompleted [this]
(do
(completed resp)
+ (when-not (realized? (:body resp))
+ (deliver (:body resp) nil))
(deliver (:done resp) true)))
(^{:tag void}
onThrowable [this #^Throwable t]
View
2  test/http/async/client/test.clj
@@ -598,7 +598,7 @@
(is (thrown-with-msg? RuntimeException #"Closed" (GET client "http://localhost:8123/")))))
(deftest extract-empty-body
- (let [resp (await (GET *client* "http://localhost:8123/empty"))]
+ (let [resp (GET *client* "http://localhost:8123/empty")]
(is (nil? (string resp)))))
;;(deftest profile-get-stream
Please sign in to comment.
Something went wrong with that request. Please try again.