Permalink
Browse files

Fix resource-response not working from jars.

  • Loading branch information...
1 parent 2e9f334 commit 459d732cc30fb129b41af11c73f255a44225851e @nathell nathell committed with weavejester Jul 17, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 ring-core/src/ring/util/response.clj
View
5 ring-core/src/ring/util/response.clj
@@ -61,9 +61,8 @@
:root - take the resource relative to this root"
[path & [opts]]
(let [path (str (:root opts "") "/" path)
- path (.replace path "//" "/")
- loader (clojure.lang.RT/baseLoader)]
- (if-let [resource (.getResourceAsStream loader path)]
+ path (.replace path "//" "/")]
+ (if-let [resource (.getResourceAsStream (class file-response) path)] ; any Ring fn will do here
(response resource))))
(defn status

0 comments on commit 459d732

Please sign in to comment.