HTTP server in cljs.browser.repl doesn't serve files with extensions other than specified in ext->mime-type

Description

Adding an entry to cljs.repl.browser/ext->mime-type superficially fixes that.

1) Currently used MIME type identification is very simplistic and doesn't return correct MIME types for most files. Instead, this should be delegated to the host:

2) Since both files and sockets are abstractions over bytes, cljs.repl.server/send-and-close should be agnostic to file encoding and just send whatever is in the file. Currently this is handled via cljs.repl.browser/mime-type->encoding.

I will prepare a patch by tomorrow.

Environment

None

Assignee

Yegor Timoshenko

Reporter

Yegor Timoshenko

Labels

None

Approval

None

Patch

Code

Affects versions

Priority

Major
Configure