$ cat deps.edn
{:deps {org.clojure/clojure {:mvn/version "1.9.0-RC2"}
org.clojure/clojurescript {:mvn/version "1.9.946"}}
$ touch hello.xml
$ clojure -m cljs.browser.repl &
$ curl localhost:9000/hello.xml
<html><body><h2>Page not found</h2>No page /hello.xml found on this server.</body></html>
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:
(ns cljs.repl.browser
(:import [java.nio.file Files Paths]))
(defn get-content-type [path]
(Files/probeContentType (Paths/get path (into-array String []))))
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.