aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_http.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_http.py b/test/test_http.py
index f7d861fd..e98a891f 100644
--- a/test/test_http.py
+++ b/test/test_http.py
@@ -136,6 +136,8 @@ def test_parse_http_protocol():
def test_parse_init_connect():
assert http.parse_init_connect("CONNECT host.com:443 HTTP/1.0")
+ assert not http.parse_init_connect("CONNECT \0host.com:443 HTTP/1.0")
+ assert not http.parse_init_connect("CONNECT host.com:444444 HTTP/1.0")
assert not http.parse_init_connect("bogus")
assert not http.parse_init_connect("GET host.com:443 HTTP/1.0")
assert not http.parse_init_connect("CONNECT host.com443 HTTP/1.0")
@@ -164,11 +166,10 @@ def test_parse_init_http():
assert m == "GET"
assert u == "/test"
assert httpversion == (1, 1)
-
assert not http.parse_init_http("invalid")
assert not http.parse_init_http("GET invalid HTTP/1.1")
assert not http.parse_init_http("GET /test foo/1.1")
-
+ assert not http.parse_init_http("GET /test\xc0 HTTP/1.1")
class TestReadHeaders:
def _read(self, data, verbatim=False):