diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-21 17:27:23 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-21 17:27:23 +1200 |
commit | 29f907ecf98468a89b5a7575b539938dc6741a8e (patch) | |
tree | 1725a5821666b886b215d96b364b5582ea3a8a99 /test/test_http.py | |
parent | 2387d2e8ed7d94e42b1ac02a4ea73f54e4c63ab8 (diff) | |
download | mitmproxy-29f907ecf98468a89b5a7575b539938dc6741a8e.tar.gz mitmproxy-29f907ecf98468a89b5a7575b539938dc6741a8e.tar.bz2 mitmproxy-29f907ecf98468a89b5a7575b539938dc6741a8e.zip |
Handle HTTP versions malformed due to non-integer major/minor numbers.
Diffstat (limited to 'test/test_http.py')
-rw-r--r-- | test/test_http.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_http.py b/test/test_http.py index 206fc4df..0174a4aa 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -106,6 +106,8 @@ def test_read_http_body(): def test_parse_http_protocol(): assert http.parse_http_protocol("HTTP/1.1") == (1, 1) assert http.parse_http_protocol("HTTP/0.0") == (0, 0) + assert not http.parse_http_protocol("HTTP/a.1") + assert not http.parse_http_protocol("HTTP/1.a") assert not http.parse_http_protocol("foo/0.0") assert not http.parse_http_protocol("HTTP/x") |