Permalink
Browse files
Fix resource-response not working from jars.
- Loading branch information...
Showing
with
2 additions
and
3 deletions.
-
+2
−3
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