We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3cfd4a2 + feb353c commit 9fd5739Copy full SHA for 9fd5739
1 file changed
ring-core-protocols/src/ring/core/protocols.clj
@@ -31,7 +31,7 @@
31
(some #(when (.equalsIgnoreCase "content-type" (key %)) (val %)))
32
(find-charset-in-content-type)))
33
34
-(defn- str->bytes [^String s ^String charset]
+(defn- str->bytes ^bytes [^String s ^String charset]
35
(if charset (.getBytes s charset) (.getBytes s)))
36
37
(defn- response-writer ^Writer [response ^OutputStream output-stream]
@@ -54,7 +54,7 @@
54
55
(extend-protocol StreamableResponseBody
56
String
57
- (write-body-to-stream [body response output-stream]
+ (write-body-to-stream [body response ^OutputStream output-stream]
58
;; No need to use a writer for a single string, and this prevents a
59
;; flush being used for a value of fixed length.
60
(.write output-stream (str->bytes body (response-charset response)))
0 commit comments