aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-09-11 01:18:17 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-09-11 01:18:17 +0200
commitc159c8ca13afa6a909f456e41c1a3f57b98baf8a (patch)
treee502fbd569dd417034c4446341f0f750c371afa8 /test
parent30f0ee40c51fc6bc911169f044677e235087161e (diff)
downloadmitmproxy-c159c8ca13afa6a909f456e41c1a3f57b98baf8a.tar.gz
mitmproxy-c159c8ca13afa6a909f456e41c1a3f57b98baf8a.tar.bz2
mitmproxy-c159c8ca13afa6a909f456e41c1a3f57b98baf8a.zip
fix chunked encoding
Diffstat (limited to 'test')
-rw-r--r--test/test_server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_server.py b/test/test_server.py
index 829b5f0a..49258791 100644
--- a/test/test_server.py
+++ b/test/test_server.py
@@ -711,7 +711,7 @@ class TestStreamRequest(tservers.HTTPProxTest):
connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connection.connect(("127.0.0.1", self.proxy.port))
fconn = connection.makefile()
- spec = '200:h"Transfer-Encoding"="chunked":r:b"4\\r\\nthis\\r\\n7\\r\\nisatest\\r\\n0\\r\\n\\r\\n"'
+ spec = '200:h"Transfer-Encoding"="chunked":r:b"4\\r\\nthis\\r\\n11\\r\\nisatest__reachhex\\r\\n0\\r\\n\\r\\n"'
connection.send(
"GET %s/p/%s HTTP/1.1\r\n" %
(self.server.urlbase, spec))
@@ -726,7 +726,7 @@ class TestStreamRequest(tservers.HTTPProxTest):
chunks = list(protocol.read_http_body_chunked(
resp.headers, None, "GET", 200, False
))
- assert chunks == ["this", "isatest", ""]
+ assert chunks == ["this", "isatest__reachhex"]
connection.close()