Fork me on GitHub

does anyone know why Jetty would be serving a css page as text/plain? Or maybe something I am doing wrong in Hiccup? I am getting the following message in the browser:

Resource interpreted as Stylesheet but transferred with MIME type text/plain


@ryan.russell011 how do you have your app configured to serve resources (files)?


how might i go about writing a Clojure spec that restricts a map to only contain keys that are a subset of a superset of keys? for example, given valid keys #{:test/a :test/b :test/c :test/d}, map {:test/a nil :test/c nil} is valid.


hmm. looks like disallowing keys is not the right paradigm after all.


anywho i solved it with s/map-of:

(s/conform (s/map-of #{:test/a :test/b} string?) {:test/a "test" :test/b "test" :test/c "test"})
=> :clojure.spec.alpha/invalid


As you already discovered, that's not idiomatic. Clojure is mean to be open for extension -- and closed key maps run counter to that.


my true intention was to help focus the results of generating test data


fmap to the rescue. thanks for your input by the way.