diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2020-04-25 20:54:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 20:54:59 +0200 |
commit | 079f39bddceb89b52f80952dd9beed0a8fc331d2 (patch) | |
tree | e16c30b14b4e16a397685a6eada20926fde3bf2b /uri_test.go | |
parent | Fix integer overflow handling in parseUintBuf() (#789) (diff) | |
download | fasthttp-079f39bddceb89b52f80952dd9beed0a8fc331d2.tar.gz fasthttp-079f39bddceb89b52f80952dd9beed0a8fc331d2.tar.bz2 fasthttp-079f39bddceb89b52f80952dd9beed0a8fc331d2.zip |
Don't allow ASCII control character in URLs (#790)
* Don't allow ASCII control character in URLs
* Add tests
Diffstat (limited to 'uri_test.go')
-rw-r--r-- | uri_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/uri_test.go b/uri_test.go index 9c4a67b..d41c067 100644 --- a/uri_test.go +++ b/uri_test.go @@ -354,6 +354,9 @@ func TestURIParse(t *testing.T) { testURIParse(t, &u, "", "//aaa.com//absolute", "http://aaa.com/absolute", "aaa.com", "/absolute", "//absolute", "", "") + + testURIParse(t, &u, "", "//aaa.com\r\n\r\nGET x", + "http:///", "", "/", "", "", "") } func testURIParse(t *testing.T, u *URI, host, uri, |