aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-15 17:40:08 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-15 17:40:08 +1200
commitc7952371b718b6eb8d14e8fb8acddcdcbd8def5e (patch)
tree3b68562c0090370f04d3c4574cf4866f7ef817ba /test
parent8ae32708076efdf2bf88f5bb288e90c871eeec21 (diff)
downloadmitmproxy-c7952371b718b6eb8d14e8fb8acddcdcbd8def5e.tar.gz
mitmproxy-c7952371b718b6eb8d14e8fb8acddcdcbd8def5e.tar.bz2
mitmproxy-c7952371b718b6eb8d14e8fb8acddcdcbd8def5e.zip
Fix a problem in ODictCaseless that could cause duplicate headers.
Diffstat (limited to 'test')
-rw-r--r--test/test_flow.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_flow.py b/test/test_flow.py
index 59d130f7..89577ddb 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -1052,6 +1052,12 @@ class TestODictCaseless:
def setUp(self):
self.od = flow.ODictCaseless()
+ def test_override(self):
+ o = flow.ODictCaseless()
+ o.add('T', 'application/x-www-form-urlencoded; charset=UTF-8')
+ o["T"] = ["foo"]
+ assert o["T"] == ["foo"]
+
def test_case_preservation(self):
self.od["Foo"] = ["1"]
assert "foo" in self.od