aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2018-03-04 19:53:15 +0100
committerGitHub <noreply@github.com>2018-03-04 19:53:15 +0100
commita2740ee4aec5bd6258a0d9c17d58b7ef7d2ed3ee (patch)
tree427098361e6193b8e9e6e06c22f356eb4e8fbdaf /test
parent618d52a65e79e06441b3e6672c4b11317201e46e (diff)
parentfb54bb377763b4e57c1a092610d83a2b9ac4e6e9 (diff)
downloadmitmproxy-a2740ee4aec5bd6258a0d9c17d58b7ef7d2ed3ee.tar.gz
mitmproxy-a2740ee4aec5bd6258a0d9c17d58b7ef7d2ed3ee.tar.bz2
mitmproxy-a2740ee4aec5bd6258a0d9c17d58b7ef7d2ed3ee.zip
Merge pull request #2868 from kira0204/data-crash
Fix crashing when editing form with random data, fix #2794
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/net/http/test_request.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/mitmproxy/net/http/test_request.py b/test/mitmproxy/net/http/test_request.py
index ce49002c..ef581a91 100644
--- a/test/mitmproxy/net/http/test_request.py
+++ b/test/mitmproxy/net/http/test_request.py
@@ -351,10 +351,10 @@ class TestRequestUtils:
request.headers["Content-Type"] = "application/x-www-form-urlencoded"
assert list(request.urlencoded_form.items()) == [("foobar", "baz")]
request.raw_content = b"\xFF"
- assert len(request.urlencoded_form) == 0
+ assert len(request.urlencoded_form) == 1
def test_set_urlencoded_form(self):
- request = treq()
+ request = treq(content=b"\xec\xed")
request.urlencoded_form = [('foo', 'bar'), ('rab', 'oof')]
assert request.headers["Content-Type"] == "application/x-www-form-urlencoded"
assert request.content