Dear all,I've added a static resource from webjars to my project.clj:--[org.webjars/bootstrap "2.3.1"]
which also pulls in [org.webjars/jquery "1.9.0"].
To make these available I have added this to my middleware:
(resource/wrap-resource "/META-INF/resources/")
Since I've done this, a GET request to "/" returns an empty page. After some debugging I found out where it probably comes from.
In ring.util.response/resource-response I added a couple of debug println statements.
See this refheap paste with the adapted version and the corresponding output:
https://www.refheap.com/paste/13318
What happens, I think, is the directory in the jar file jquery-1.9.0.jar gets recognized as a resource. It's protocol is not "file", hence it gets returned as an input-stream, which results in an empty page.
Is this a bug in ring-core? I would be surprised if I was the first one encountering this one.
Kind regards,
Michiel Borkent
You received this message because you are subscribed to the Google Groups "Ring" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-clojure...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
(route/resources "/bootstrap/" {:root "META-INF/resources/webjars/bootstrap/2.3.1/"})
This is actually a better idea, because then I have only to change the version number in one place when upgrading.