We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b25f8cc commit 02f724bCopy full SHA for 02f724b
1 file changed
test/ring/util/test/codec.clj
@@ -65,6 +65,14 @@
65
"a=b%2Fc" {"a" "b/c"}
66
"a=b&c" {"a" "b" "c" ""}
67
"a=&b=c" {"a" "" "b" "c"}
68
- "a&b=c" {"a" "" "b" "c"})
+ "a&b=c" {"a" "" "b" "c"}
69
+ "=" {"" ""}
70
+ "a=" {"a" ""}
71
+ "=b" {"" "b"})
72
+ (testing "invalid URL encoding"
73
+ (are [x y] (= (form-decode x) y)
74
+ "%=b" {nil "b"}
75
+ "a=%" {"a" nil}
76
+ "%=%" {nil nil}))
77
(is (= (form-decode "a=foo%FE%FF%00%2Fbar" "UTF-16")
78
{"a" "foo/bar"})))
0 commit comments