aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmproxy/console.py1
-rw-r--r--test/test_encoding.py3
-rw-r--r--test/test_proxy.py8
3 files changed, 6 insertions, 6 deletions
diff --git a/libmproxy/console.py b/libmproxy/console.py
index 9b77b9dc..39fb871f 100644
--- a/libmproxy/console.py
+++ b/libmproxy/console.py
@@ -1728,6 +1728,7 @@ class ConsoleMaster(flow.FlowMaster):
self.anticomp = not self.anticomp
elif a == "d":
self.autodecode = not self.autodecode
+ self.refresh_connection(self.currentflow)
elif a == "k":
self.killextra = not self.killextra
elif a == "n":
diff --git a/test/test_encoding.py b/test/test_encoding.py
index dff146ee..d9e6a85c 100644
--- a/test/test_encoding.py
+++ b/test/test_encoding.py
@@ -10,8 +10,7 @@ class uidentity(libpry.AutoTree):
assert "string" == encoding.encode("identity", "string")
def test_fallthrough(self):
- assert "string" == encoding.decode("nonexistent encoding", "string")
- assert "string" == encoding.encode("nonexistent encoding", "string")
+ assert None == encoding.decode("nonexistent encoding", "string")
class ugzip(libpry.AutoTree):
def test_simple(self):
diff --git a/test/test_proxy.py b/test/test_proxy.py
index 340a68d7..83898d11 100644
--- a/test/test_proxy.py
+++ b/test/test_proxy.py
@@ -143,7 +143,7 @@ class uRequest(libpry.AutoTree):
r.headers["content-encoding"] = ["identity"]
r.content = "falafel"
r.decode()
- assert r.headers["content-encoding"] == ["identity"]
+ assert not r.headers["content-encoding"]
assert r.content == "falafel"
r = tutils.treq()
@@ -160,7 +160,7 @@ class uRequest(libpry.AutoTree):
assert r.headers["content-encoding"] == ["gzip"]
assert r.content != "falafel"
r.decode()
- assert r.headers["content-encoding"] == ["identity"]
+ assert not r.headers["content-encoding"]
assert r.content == "falafel"
@@ -233,7 +233,7 @@ class uResponse(libpry.AutoTree):
r.headers["content-encoding"] = ["identity"]
r.content = "falafel"
r.decode()
- assert r.headers["content-encoding"] == ["identity"]
+ assert not r.headers["content-encoding"]
assert r.content == "falafel"
r = tutils.tresp()
@@ -250,7 +250,7 @@ class uResponse(libpry.AutoTree):
assert r.headers["content-encoding"] == ["gzip"]
assert r.content != "falafel"
r.decode()
- assert r.headers["content-encoding"] == ["identity"]
+ assert not r.headers["content-encoding"]
assert r.content == "falafel"