diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-07-30 13:52:13 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-07-30 19:40:00 +0200 |
commit | 7b10817670b30550dd45af48491ed8cf3cacd5e6 (patch) | |
tree | cec2f094e20b2bf204f0420b67ba5774a47c9f50 /test/http | |
parent | c7fcc2cca5ff85641febbb908d11d22336bbd81c (diff) | |
download | mitmproxy-7b10817670b30550dd45af48491ed8cf3cacd5e6.tar.gz mitmproxy-7b10817670b30550dd45af48491ed8cf3cacd5e6.tar.bz2 mitmproxy-7b10817670b30550dd45af48491ed8cf3cacd5e6.zip |
http2: improve protocol
Diffstat (limited to 'test/http')
-rw-r--r-- | test/http/http2/test_protocol.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/http/http2/test_protocol.py b/test/http/http2/test_protocol.py index 5febc480..b2d414d1 100644 --- a/test/http/http2/test_protocol.py +++ b/test/http/http2/test_protocol.py @@ -222,7 +222,7 @@ class TestAssembleRequest(): bytes = http2.HTTP2Protocol(self.c).assemble_request(http.Request( '', 'GET', - '', + 'https', '', '', '/', @@ -237,7 +237,7 @@ class TestAssembleRequest(): bytes = http2.HTTP2Protocol(self.c).assemble_request(http.Request( '', 'GET', - '', + 'https', '', '', '/', @@ -269,11 +269,12 @@ class TestReadResponse(tservers.ServerTestBase): c.connect() c.convert_to_ssl() protocol = http2.HTTP2Protocol(c) + protocol.connection_preface_performed = True resp = protocol.read_response() assert resp.httpversion == (2, 0) - assert resp.status_code == "200" + assert resp.status_code == 200 assert resp.msg == "" assert resp.headers.lst == [[':status', '200'], ['etag', 'foobar']] assert resp.body == b'foobar' @@ -294,12 +295,13 @@ class TestReadEmptyResponse(tservers.ServerTestBase): c.connect() c.convert_to_ssl() protocol = http2.HTTP2Protocol(c) + protocol.connection_preface_performed = True resp = protocol.read_response() assert resp.stream_id assert resp.httpversion == (2, 0) - assert resp.status_code == "200" + assert resp.status_code == 200 assert resp.msg == "" assert resp.headers.lst == [[':status', '200'], ['etag', 'foobar']] assert resp.body == b'' @@ -322,6 +324,7 @@ class TestReadRequest(tservers.ServerTestBase): c.connect() c.convert_to_ssl() protocol = http2.HTTP2Protocol(c, is_server=True) + protocol.connection_preface_performed = True resp = protocol.read_request() |