diff options
author | Shadab Zafar <dufferzafar0@gmail.com> | 2016-08-12 01:31:33 +0530 |
---|---|---|
committer | Shadab Zafar <dufferzafar0@gmail.com> | 2016-08-15 12:00:23 +0530 |
commit | 4f1fb43dcce262b3ade52d93f218538c1a64e4fd (patch) | |
tree | eca6a32f7b186a4bcfceb27f6e0bf590d911affb | |
parent | 15c488225fe3028e7f4a173de09a320f5a4c506d (diff) | |
download | mitmproxy-4f1fb43dcce262b3ade52d93f218538c1a64e4fd.tar.gz mitmproxy-4f1fb43dcce262b3ade52d93f218538c1a64e4fd.tar.bz2 mitmproxy-4f1fb43dcce262b3ade52d93f218538c1a64e4fd.zip |
Use postData field in PUT, PATCH requests too
The HAR spec isn't really clear on whether this should be the case,
but Google Chrome does this, so I think we should too.
-rw-r--r-- | examples/har_dump.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/har_dump.py b/examples/har_dump.py index 4ab6b5a9..803a3249 100644 --- a/examples/har_dump.py +++ b/examples/har_dump.py @@ -135,7 +135,7 @@ def response(flow): else: entry["response"]["content"]["text"] = flow.response.content - if flow.request.method == "POST": + if flow.request.method in ["POST", "PUT", "PATCH"]: entry["request"]["postData"] = { "mimeType": flow.request.headers.get("Content-Type", "").split(";")[0], "text": flow.request.content, |