kachayev / nasus

Zero-configuration command-line async HTTP files server in Clojure. Like Python's SimpleHTTPServer but scalable.
MIT License
166 stars 9 forks source link

Internal server error when getting empty file #3

Closed emlyn closed 5 years ago

emlyn commented 5 years ago

Trying to get an empty file returns a 500 response with a MagicMatchNotFoundException exception and stacktrace. I imagine this could also happen for other files where the mime type cannot be determined.

It should probably fall back to a default like application/octet-stream if the mime type cannot be determined.

emlyn commented 5 years ago

Actually, according to this, the Content-Type header should be omitted if the mime type is not known.

kachayev commented 5 years ago

Github now automatically closes the issue instead of mentioning it based on commit messages? 🤔

kachayev commented 5 years ago

Released 0.1.2. Thanks!