We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fd5739 commit 97f34a8Copy full SHA for 97f34a8
ring-core/src/ring/middleware/content_length.clj
@@ -14,12 +14,12 @@
14
(extend (Class/forName "[B")
15
SizableResponseBody
16
{:body-size-in-bytes
17
- (fn [bs _] (alength bs))})
+ (fn [^bytes bs _] (alength bs))})
18
19
(extend-protocol SizableResponseBody
20
String
21
(body-size-in-bytes [s response]
22
- (when-let [charset (resp/get-charset response)]
+ (when-let [^String charset (resp/get-charset response)]
23
(alength (.getBytes s charset))))
24
java.io.File
25
(body-size-in-bytes [f _]
0 commit comments