diff options
author | Aliaksandr Valialkin <valyala@gmail.com> | 2015-12-23 19:26:48 +0200 |
---|---|---|
committer | Aliaksandr Valialkin <valyala@gmail.com> | 2015-12-23 19:26:48 +0200 |
commit | eb18481efb8673a67bf7843e6f97bccb66c3f65c (patch) | |
tree | 3f068f7d5cb9dc6d48a690661d285d049a0e6d9a /args_test.go | |
parent | Removed 'v interface{}' hack from structs managed via sync.Pool, since it has... (diff) | |
download | fasthttp-eb18481efb8673a67bf7843e6f97bccb66c3f65c.tar.gz fasthttp-eb18481efb8673a67bf7843e6f97bccb66c3f65c.tar.bz2 fasthttp-eb18481efb8673a67bf7843e6f97bccb66c3f65c.zip |
Escape query args chars according to http://www.w3.org/TR/html5/forms.html#form-submission-algorithm
Diffstat (limited to 'args_test.go')
-rw-r--r-- | args_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/args_test.go b/args_test.go index f994217..e238272 100644 --- a/args_test.go +++ b/args_test.go @@ -10,7 +10,7 @@ import ( func TestArgsEscape(t *testing.T) { testArgsEscape(t, "foo", "bar", "foo=bar") testArgsEscape(t, "f.o,1:2/4", "~`!@#$%^&*()_-=+\\|/[]{};:'\"<>,./?", - "f.o,1:2/4=%7E%60%21%40%23%24%25%5E%26%2A%28%29_-%3D%2B%5C%7C/%5B%5D%7B%7D%3B:%27%22%3C%3E,./%3F") + "f.o%2C1%3A2%2F4=%7E%60%21%40%23%24%25%5E%26*%28%29_-%3D%2B%5C%7C%2F%5B%5D%7B%7D%3B%3A%27%22%3C%3E%2C.%2F%3F") } func testArgsEscape(t *testing.T, k, v, expectedS string) { @@ -153,7 +153,7 @@ func TestArgsString(t *testing.T) { testArgsString(t, &a, "foo=bar") testArgsString(t, &a, "foo=bar&baz=sss") testArgsString(t, &a, "") - testArgsString(t, &a, "f%20o=x.x/x%D0%BF%D1%80%D0%B8%D0%B2%D0%B5aaa&sdf=ss") + testArgsString(t, &a, "f%20o=x.x*-_8x%D0%BF%D1%80%D0%B8%D0%B2%D0%B5aaa&sdf=ss") testArgsString(t, &a, "=asdfsdf") } |