aboutsummaryrefslogtreecommitdiff
path: root/uri_test.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2020-04-25 20:54:59 +0200
committerGravatar GitHub <noreply@github.com> 2020-04-25 20:54:59 +0200
commit079f39bddceb89b52f80952dd9beed0a8fc331d2 (patch)
treee16c30b14b4e16a397685a6eada20926fde3bf2b /uri_test.go
parentFix integer overflow handling in parseUintBuf() (#789) (diff)
downloadfasthttp-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.go3
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,