diff options
author | Maximilian Hils <git@maximilianhils.com> | 2017-08-22 00:59:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 00:59:51 +0200 |
commit | 721f7cc92ecdeb03b3f507077e7ef29d48d833ca (patch) | |
tree | 612d332d0ef2aac63cde2b00b5bef73d3696f61e /mitmproxy | |
parent | 7e154171bffbe30c990dd4a522bc65a3a72f2975 (diff) | |
parent | bf243244ce3b0c88170484444ce340129b984dee (diff) | |
download | mitmproxy-721f7cc92ecdeb03b3f507077e7ef29d48d833ca.tar.gz mitmproxy-721f7cc92ecdeb03b3f507077e7ef29d48d833ca.tar.bz2 mitmproxy-721f7cc92ecdeb03b3f507077e7ef29d48d833ca.zip |
Merge pull request #2540 from mhils/relatively-static
Make it possible to run static viewer in subdirectories
Diffstat (limited to 'mitmproxy')
-rw-r--r-- | mitmproxy/tools/web/app.py | 2 | ||||
-rw-r--r-- | mitmproxy/tools/web/static_viewer.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/tools/web/app.py b/mitmproxy/tools/web/app.py index 9c6f7583..77695515 100644 --- a/mitmproxy/tools/web/app.py +++ b/mitmproxy/tools/web/app.py @@ -478,7 +478,7 @@ class Application(tornado.web.Application): (r"/flows/(?P<flow_id>[0-9a-f\-]+)/duplicate", DuplicateFlow), (r"/flows/(?P<flow_id>[0-9a-f\-]+)/replay", ReplayFlow), (r"/flows/(?P<flow_id>[0-9a-f\-]+)/revert", RevertFlow), - (r"/flows/(?P<flow_id>[0-9a-f\-]+)/(?P<message>request|response)/_content", FlowContent), + (r"/flows/(?P<flow_id>[0-9a-f\-]+)/(?P<message>request|response)/content.data", FlowContent), ( r"/flows/(?P<flow_id>[0-9a-f\-]+)/(?P<message>request|response)/content/(?P<content_view>[0-9a-zA-Z\-\_]+)(?:\.json)?", FlowContentView), diff --git a/mitmproxy/tools/web/static_viewer.py b/mitmproxy/tools/web/static_viewer.py index c4f8b139..416c2539 100644 --- a/mitmproxy/tools/web/static_viewer.py +++ b/mitmproxy/tools/web/static_viewer.py @@ -48,7 +48,7 @@ def save_flows_content(path: pathlib.Path, flows: typing.Iterable[flow.Flow]) -> message_path = path / "flows" / f.id / m os.makedirs(str(message_path / "content"), exist_ok=True) - with open(str(message_path / '_content'), 'wb') as content_file: + with open(str(message_path / 'content.data'), 'wb') as content_file: # don't use raw_content here as this is served with a default content type if message: content_file.write(message.content) |