forked from ring-clojure/ring
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed parameter-parsing issue with non-UTF8-encoded data
- Loading branch information
1 parent
74381d1
commit 8cd85cf
Showing
3 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,7 +1,10 @@ | |||
(ns ring.util.test | (ns ring.util.test | ||
"Utilities for testing Ring components." | "Utilities for testing Ring components." | ||
(:import (java.io ByteArrayInputStream))) | (:import java.io.ByteArrayInputStream)) | ||
|
|
||
(defn string-input-stream [^String s] | (defn string-input-stream | ||
"Returns a ByteArrayInputStream for the given String." | "Returns a ByteArrayInputStream for the given String." | ||
(ByteArrayInputStream. (.getBytes s))) | ([^String s] | ||
(ByteArrayInputStream. (.getBytes s))) | |||
([^String s encoding] | |||
(ByteArrayInputStream. (.getBytes s encoding)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters