Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An attempt to send non-existing file as a server response hangs up the connection #459

Closed
kachayev opened this issue Dec 30, 2018 · 1 comment · Fixed by #471
Closed
Labels

Comments

@kachayev
Copy link
Collaborator

kachayev commented Dec 30, 2018

Assume the following:

(require '[aleph.http :as http])
(def f (java.io.File. "this-file-does-not-exist"))
(http/start-server (fn [_] {:status 200 :body f}) {:port 2018})

Any request to the server never completes (client will hang up either until its own timeout or forever). We need to catch exceptions thrown by RandomAccessFile constructor here and respond with 500 status code.

@kachayev
Copy link
Collaborator Author

Closing the issue as the solution had been already merged into 1.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant