diff options
author | Daniel Firsht <dfirsht@gmail.com> | 2019-09-17 23:56:18 -0700 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2019-09-18 08:56:18 +0200 |
commit | ee8450036eb75d30d45d58a7c8aeff41b881d7cc (patch) | |
tree | a072c2b455731613b97ff8b44df1acd23d96d094 /uri_test.go | |
parent | Update fuzzit (diff) | |
download | fasthttp-ee8450036eb75d30d45d58a7c8aeff41b881d7cc.tar.gz fasthttp-ee8450036eb75d30d45d58a7c8aeff41b881d7cc.tar.bz2 fasthttp-ee8450036eb75d30d45d58a7c8aeff41b881d7cc.zip |
Added option to disable path normalization (#649)
Diffstat (limited to 'uri_test.go')
-rw-r--r-- | uri_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/uri_test.go b/uri_test.go index 7ed05f9..84f9380 100644 --- a/uri_test.go +++ b/uri_test.go @@ -184,6 +184,16 @@ func testURIPathNormalize(t *testing.T, u *URI, requestURI, expectedPath string) } } +func TestURINoNormalization(t *testing.T) { + var u URI + irregularPath := "/aaa%2Fbbb%2F%2E.%2Fxxx" + u.Parse(nil, []byte(irregularPath)) + u.DisablePathNormalizing = true + if string(u.RequestURI()) != irregularPath { + t.Fatalf("Unexpected path %q. Expected %q.", u.Path(), irregularPath) + } +} + func TestURICopyTo(t *testing.T) { var u URI var copyU URI |