Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ring-core/src/ring/util/response.clj
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,14 @@
(if-not (zero? last-mod)
(Date. last-mod))))

(defmethod resource-data :resource
[^java.net.URL url]
;; GraalVM resource scheme
(let [resource (.openConnection url)]
{:content (.getInputStream resource)
:content-length (connection-content-length resource)
:last-modified (connection-last-modified resource)}))

(defmethod resource-data :jar
[^java.net.URL url]
(let [conn (.openConnection url)]
Expand Down