diff options
Diffstat (limited to 'mitmproxy/flow/master.py')
-rw-r--r-- | mitmproxy/flow/master.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mitmproxy/flow/master.py b/mitmproxy/flow/master.py index efb5d013..a4aa9a7e 100644 --- a/mitmproxy/flow/master.py +++ b/mitmproxy/flow/master.py @@ -16,7 +16,6 @@ from mitmproxy.flow import modules from mitmproxy.onboarding import app from mitmproxy.protocol import http_replay from mitmproxy.proxy.config import HostMatcher -from netlib import strutils class FlowMaster(controller.Master): @@ -348,13 +347,16 @@ class FlowMaster(controller.Master): return "Can't replay live request." if f.intercepted: return "Can't replay while intercepting..." - if f.request.content is None: + if f.request.raw_content is None: return "Can't replay request with missing content..." if f.request: f.backup() f.request.is_replay = True + + # TODO: We should be able to remove this. if "Content-Length" in f.request.headers: - f.request.headers["Content-Length"] = str(len(f.request.content)) + f.request.headers["Content-Length"] = str(len(f.request.raw_content)) + f.response = None f.error = None self.process_new_request(f) |