We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f92911c + b873e42 commit 68bf105Copy full SHA for 68bf105
ring-core/project.clj
@@ -1,4 +1,4 @@
1
-(defproject ring/ring-core "1.12.2"
+(defproject ring/ring-core "1.12.2-patched-graal"
2
:description "Ring core libraries."
3
:url "https://github.com/ring-clojure/ring"
4
:scm {:dir ".."}
ring-core/src/ring/util/response.clj
@@ -297,6 +297,14 @@
297
:content-length (connection-content-length conn)
298
:last-modified (connection-last-modified conn)})))
299
300
+(defmethod resource-data :resource
301
+ [^java.net.URL url]
302
+ ;; GraalVM resource scheme
303
+ (let [resource (.openConnection url)]
304
+ {:content (.getInputStream resource)
305
+ :content-length (connection-content-length resource)
306
+ :last-modified (connection-last-modified resource)}))
307
+
308
(defn url-response
309
"Return a response for the supplied URL."
310
{:added "1.2"}
0 commit comments