From e67dbf61236c479acc77db1fbeb98d1c06ff9a0b Mon Sep 17 00:00:00 2001 From: Michael Frister Date: Thu, 8 Mar 2012 23:08:08 +0100 Subject: [PATCH] Handle Transfer-Encoding header values case insensitive According to HTTP/1.1 RFC 2616 Section 3.6. --- libmproxy/proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 3a7f807e6..c5833d0ce 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -106,7 +106,7 @@ def read_chunked(fp, limit): def read_http_body(rfile, connection, headers, all, limit): if 'transfer-encoding' in headers: - if not ",".join(headers["transfer-encoding"]) == "chunked": + if not ",".join(headers["transfer-encoding"]).lower() == "chunked": raise IOError('Invalid transfer-encoding') content = read_chunked(rfile, limit) elif "content-length" in headers: