From 8702c9357d71b38fcc1175b3a234c563b995d3d7 Mon Sep 17 00:00:00 2001 From: Schamper Date: Tue, 6 Sep 2016 10:24:36 +0200 Subject: [PATCH] Fix decoding when content-encoding: none --- netlib/encoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlib/encoding.py b/netlib/encoding.py index a3c83c46e..040aceaf9 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