From 6e4af64050fe9a0efbfa73193131065b96feca3c Mon Sep 17 00:00:00 2001 From: Matthew Shao Date: Sun, 27 Mar 2016 09:16:40 +0800 Subject: [PATCH] minor fix about if-else statement --- mitmproxy/web/app.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mitmproxy/web/app.py b/mitmproxy/web/app.py index 8a8329e72..cf3c8bdd9 100644 --- a/mitmproxy/web/app.py +++ b/mitmproxy/web/app.py @@ -25,10 +25,8 @@ def _strip_content(flow_state): continue if message["content"]: message["contentLength"] = len(message["content"]) - elif message["content"] is None: - message["contentLength"] = None else: - message["contentLength"] = 0 + message["contentLength"] = None del message["content"] if "backup" in flow_state: