parent
191874f50f
commit
7c864d188f
|
@ -86,6 +86,12 @@ Encodes a string according to the rules in @cite["RFC3986"] for the userinfo fie
|
|||
@defproc[(uri-userinfo-decode [str string?]) string?]{
|
||||
Decodes a string according to the rules in @cite["RFC3986"] for the userinfo field.
|
||||
}
|
||||
@defproc[(uri-unreserved-encode [str string?]) string?]{
|
||||
Encodes a string according to the rules in @cite["RFC3986"](section 2.3) for the unreserved characters.
|
||||
}
|
||||
@defproc[(uri-unreserved-decode [str string?]) string?]{
|
||||
Decodes a string according to the rules in @cite["RFC3986"](section 2.3) for the unreserved characters.
|
||||
}
|
||||
|
||||
|
||||
@defproc[(form-urlencoded-encode [str string?]) string?]{
|
||||
|
|
|
@ -69,7 +69,17 @@
|
|||
(uri-userinfo-decode "hello") => "hello"
|
||||
(uri-userinfo-decode "hello%20there") => "hello there"
|
||||
(uri-userinfo-decode "hello:there") => "hello:there"
|
||||
|
||||
|
||||
;; tried to choose characters from each subset:
|
||||
(uri-encode "M~(@; ") => "M~(%40%3B%20"
|
||||
(uri-path-segment-encode "M~(@; ") => "M~(@%3B%20"
|
||||
(uri-userinfo-encode "M~(@; ") => "M~(%40;%20"
|
||||
(uri-unreserved-encode "M~(@; ") => "M~%28%40%3B%20"
|
||||
;; matching decodes:
|
||||
(uri-decode "M~(%40%3B%20") => "M~(@; "
|
||||
(uri-path-segment-decode "M~(@%3B%20") => "M~(@; "
|
||||
(uri-userinfo-decode "M~(%40;%20") => "M~(@; "
|
||||
(uri-unreserved-decode "M~%28%40%3B%20") => "M~(@; "
|
||||
))
|
||||
|
||||
;; tests adapted from Noel Welsh's original test suite
|
||||
|
|
Loading…
Reference in New Issue
Block a user