From 9ac9df82c4ef976f3b0ff5d0666126f51e3023dd Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 6 May 2016 12:48:44 -0700 Subject: [PATCH] actually fix #1115 --- mitmproxy/flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/flow.py b/mitmproxy/flow.py index 0e0845882..9292e76ab 100644 --- a/mitmproxy/flow.py +++ b/mitmproxy/flow.py @@ -171,7 +171,7 @@ class StreamLargeBodies(object): expected_size = http1.expected_http_body_size( flow.request, flow.response if not is_request else None ) - if not (0 <= expected_size <= self.max_size): + if not r.content and not (0 <= expected_size <= self.max_size): # r.stream may already be a callable, which we want to preserve. r.stream = r.stream or True