aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_http.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2013-03-03 15:03:57 +1300
committerAldo Cortesi <aldo@nullcube.com>2013-03-03 15:03:57 +1300
commitcd4ed8530fa04fcbd54009e9db6ad9ea2518a10b (patch)
treeb12cf2bb02de5ab38194f1eca17c1303b968b3bc /test/test_http.py
parent2897ddfbee5ec3da72863cb8d5ee1370c9698f8a (diff)
downloadmitmproxy-cd4ed8530fa04fcbd54009e9db6ad9ea2518a10b.tar.gz
mitmproxy-cd4ed8530fa04fcbd54009e9db6ad9ea2518a10b.tar.bz2
mitmproxy-cd4ed8530fa04fcbd54009e9db6ad9ea2518a10b.zip
Check that hosts in parse_url do not contain NULL bytes.
Diffstat (limited to 'test/test_http.py')
-rw-r--r--test/test_http.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_http.py b/test/test_http.py
index 2cbba936..f41a4e2d 100644
--- a/test/test_http.py
+++ b/test/test_http.py
@@ -294,8 +294,9 @@ def test_parse_url():
# Invalid IDNA
assert not http.parse_url("http://\xfafoo")
-
assert not http.parse_url("http:/\xc6/localhost:56121")
+ assert not http.parse_url("http://foo\0")
+
def test_parse_http_basic_auth():