aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/flow_export.py
diff options
context:
space:
mode:
Diffstat (limited to 'mitmproxy/flow_export.py')
-rw-r--r--mitmproxy/flow_export.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mitmproxy/flow_export.py b/mitmproxy/flow_export.py
index 0f3847f1..42c9e56c 100644
--- a/mitmproxy/flow_export.py
+++ b/mitmproxy/flow_export.py
@@ -135,7 +135,8 @@ def locust_code(flow):
args = ""
headers = ""
if flow.request.headers:
- lines = [" '%s': '%s',\n" % (k, v) for k, v in flow.request.headers.fields if k.lower() not in ["host", "cookie"]]
+ lines = [(k, v) for k, v in flow.request.headers.fields if k.lower() not in ["host", "cookie"]]
+ lines = [" '%s': '%s',\n" % (k, v) for k, v in lines]
headers += "\n headers = {\n%s }\n" % "".join(lines)
args += "\n headers=headers,"