aboutsummaryrefslogtreecommitdiffstats
path: root/test/http/http1/test_read.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/http/http1/test_read.py')
-rw-r--r--test/http/http1/test_read.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/http/http1/test_read.py b/test/http/http1/test_read.py
index 84a43f8b..45f61b4f 100644
--- a/test/http/http1/test_read.py
+++ b/test/http/http1/test_read.py
@@ -182,10 +182,6 @@ def test_get_first_line():
rfile.readline.side_effect = TcpDisconnect
_get_first_line(rfile)
- with raises(HttpSyntaxException):
- rfile = BytesIO(b"GET /\xff HTTP/1.1")
- _get_first_line(rfile)
-
def test_read_request_line():
def t(b):
@@ -225,6 +221,10 @@ def test_read_response_line():
assert t(b"HTTP/1.1 200 OK") == (b"HTTP/1.1", 200, b"OK")
assert t(b"HTTP/1.1 200") == (b"HTTP/1.1", 200, b"")
+
+ # https://github.com/mitmproxy/mitmproxy/issues/784
+ assert t(b"HTTP/1.1 200 Non-Autoris\xc3\xa9") == (b"HTTP/1.1", 200, b"Non-Autoris\xc3\xa9")
+
with raises(HttpSyntaxException):
assert t(b"HTTP/1.1")