mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Handle Transfer-Encoding header values case insensitive
According to HTTP/1.1 RFC 2616 Section 3.6.
This commit is contained in:
parent
883424030f
commit
e67dbf6123
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user