clj-commons / aleph

Asynchronous streaming communication for Clojure - web server, web client, and raw TCP/UDP
http://aleph.io
MIT License
2.54k stars 241 forks source link

HTTP request hangs when sending empty file #559

Closed sergeyminaev closed 2 years ago

sergeyminaev commented 3 years ago
  @(aleph.http/put "https://localhost:3333"
                   {:body (clojure.java.io/file "empty.txt")
                    :pool (aleph.http/connection-pool {:connection-options {:ssl-context ctx}})
                    :request-timeout 1000})

This code throws TimeoutException because of converting empty file to Manifold source inside aleph.http.core fails with NullPointerException.

kachayev commented 3 years ago

@sergeyminaev Thanks for reporting! 1.0.0 branch has a few improvements for errors handling, a few more are introduces in this PR. I believe that this specific issue were addressed there (and there's a unit test to cover it).

KingMob commented 2 years ago

Fixed by #590