mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
Merge branch 'master' into tcp_proxy
This commit is contained in:
commit
71c1017575
@ -313,7 +313,7 @@ def read_response(rfile, method, body_size_limit):
|
|||||||
raise HttpError(502, "Invalid headers.")
|
raise HttpError(502, "Invalid headers.")
|
||||||
|
|
||||||
# Parse response body according to http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-16#section-3.3
|
# Parse response body according to http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-16#section-3.3
|
||||||
if method == "HEAD" or (code in [204, 304]) or 100 <= code <= 199:
|
if method in ["HEAD", "CONNECT"] or (code in [204, 304]) or 100 <= code <= 199:
|
||||||
content = ""
|
content = ""
|
||||||
else:
|
else:
|
||||||
content = read_http_body(rfile, headers, body_size_limit, False)
|
content = read_http_body(rfile, headers, body_size_limit, False)
|
||||||
|
Loading…
Reference in New Issue
Block a user