diff options
-rw-r--r-- | mitmproxy/web/app.py | 1 | ||||
-rw-r--r-- | web/src/js/flow/utils.js | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/mitmproxy/web/app.py b/mitmproxy/web/app.py index 812aa680..5f756ed1 100644 --- a/mitmproxy/web/app.py +++ b/mitmproxy/web/app.py @@ -314,6 +314,7 @@ class FlowContent(RequestHandler): def get(self, flow_id, message): message = getattr(self.flow, message) + contentview = self.get_argument("content_view", "raw", True) if not message.raw_content: raise APIError(400, "No content.") diff --git a/web/src/js/flow/utils.js b/web/src/js/flow/utils.js index d24f984c..0232e753 100644 --- a/web/src/js/flow/utils.js +++ b/web/src/js/flow/utils.js @@ -43,13 +43,13 @@ export var MessageUtils = { } return false; }, - getContentURL: function (flow, message) { + getContentURL: function (flow, message, view) { if (message === flow.request) { message = "request"; } else if (message === flow.response) { message = "response"; } - return "/flows/" + flow.id + "/" + message + "/content"; + return "/flows/" + flow.id + "/" + message + "/content" + (view ? "?content_view="+view : ""); }, }; |