Skip to content

Commit

Permalink
make write-body! for String skip the Object dispatch
Browse files Browse the repository at this point in the history
and as a result skip that nasty Satisfies call + io/writer based writing
  • Loading branch information
mpenet committed Nov 24, 2024
1 parent d49e812 commit 9d3113c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.12.0-alpha1"}
io.helidon.http/helidon-http {:mvn/version "4.1.1"}
io.helidon.webserver/helidon-webserver {:mvn/version "4.1.1"}
io.helidon.webserver/helidon-webserver-websocket {:mvn/version "4.1.1"}
io.helidon.webserver/helidon-webserver-http2 {:mvn/version "4.1.1"}
io.helidon.http/helidon-http {:mvn/version "4.1.4"}
io.helidon.webserver/helidon-webserver {:mvn/version "4.1.4"}
io.helidon.webserver/helidon-webserver-websocket {:mvn/version "4.1.4"}
io.helidon.webserver/helidon-webserver-http2 {:mvn/version "4.1.4"}
org.ring-clojure/ring-core-protocols {:mvn/version "1.12.0"}}

:aliases
Expand Down
5 changes: 5 additions & 0 deletions src/s_exp/hirundo/http/response.clj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
is (FileInputStream. file)]
(.transferTo is os)))

String
(write-body! [s ^ServerResponse server-response]
(.send ^ServerResponse server-response
^String s))

nil
(write-body! [_ server-response]
(.send ^ServerResponse server-response))
Expand Down

0 comments on commit 9d3113c

Please sign in to comment.