diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-17 02:13:28 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-17 02:13:28 +0200 |
commit | 14a5f405fdf3973f05ca11182e927d145d10d8d6 (patch) | |
tree | 2843010882d64d928c0f53edffa9f8d48cee6da0 /test/test_server.py | |
parent | 8fbed971ae4a84e875f1072805b17cc7ada39fad (diff) | |
download | mitmproxy-14a5f405fdf3973f05ca11182e927d145d10d8d6.tar.gz mitmproxy-14a5f405fdf3973f05ca11182e927d145d10d8d6.tar.bz2 mitmproxy-14a5f405fdf3973f05ca11182e927d145d10d8d6.zip |
use new netlib exceptions
Diffstat (limited to 'test/test_server.py')
-rw-r--r-- | test/test_server.py | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/test/test_server.py b/test/test_server.py index 0e338368..63357563 100644 --- a/test/test_server.py +++ b/test/test_server.py @@ -260,21 +260,6 @@ class TestHTTP(tservers.HTTPProxTest, CommonMixin, AppMixin): resp = p.request("get:'http://foo':h':foo'='bar'") assert resp.status_code == 400 - def test_empty_chunked_content(self): - """ - https://github.com/mitmproxy/mitmproxy/issues/186 - """ - connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - connection.connect(("127.0.0.1", self.proxy.port)) - spec = '301:h"Transfer-Encoding"="chunked":r:b"0\\r\\n\\r\\n"' - connection.send( - "GET http://localhost:%d/p/%s HTTP/1.1\r\n" % - (self.server.port, spec)) - connection.send("\r\n") - resp = connection.recv(50000) - connection.close() - assert "content-length" in resp.lower() - def test_stream(self): self.master.set_stream_large_bodies(1024 * 2) @@ -624,7 +609,7 @@ class MasterRedirectRequest(tservers.TestMaster): super(MasterRedirectRequest, self).handle_request(f) def handle_response(self, f): - f.response.content = str(f.client_conn.address.port) + f.response.body = str(f.client_conn.address.port) f.response.headers["server-conn-id"] = str(f.server_conn.source_address.port) super(MasterRedirectRequest, self).handle_response(f) |