aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/encoding.py
diff options
context:
space:
mode:
authorSchamper <Schamper@users.noreply.github.com>2016-09-06 10:24:36 +0200
committerSchamper <Schamper@users.noreply.github.com>2016-09-06 10:24:36 +0200
commit8702c9357d71b38fcc1175b3a234c563b995d3d7 (patch)
treec3edc4ad2aac204c278076aab2747387cfd8afb2 /netlib/encoding.py
parentc76d83f749079b88a2b7b7a76545a7d571ed96a5 (diff)
downloadmitmproxy-8702c9357d71b38fcc1175b3a234c563b995d3d7.tar.gz
mitmproxy-8702c9357d71b38fcc1175b3a234c563b995d3d7.tar.bz2
mitmproxy-8702c9357d71b38fcc1175b3a234c563b995d3d7.zip
Fix decoding when content-encoding: none
Diffstat (limited to 'netlib/encoding.py')
-rw-r--r--netlib/encoding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/netlib/encoding.py b/netlib/encoding.py
index a3c83c46..040aceaf 100644
--- a/netlib/encoding.py
+++ b/netlib/encoding.py
@@ -34,7 +34,7 @@ def decode(encoded, encoding, errors='strict'):
Raises:
ValueError, if decoding fails.
"""
- if len(encoded) == 0:
+ if len(encoded) == 0 or encoding == "none":
return encoded
global _cache