diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-09-09 17:31:36 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-09-09 17:31:36 +1200 |
commit | d9db1cf5b3f7bb86a5aa0f68dcc9867c708f2158 (patch) | |
tree | d2aaa1277ac2c34f8b5d54d6d80b22e76e0fc5fa /libmproxy | |
parent | 67f2610032ade035b059c2ad891d1daa5b888927 (diff) | |
download | mitmproxy-d9db1cf5b3f7bb86a5aa0f68dcc9867c708f2158.tar.gz mitmproxy-d9db1cf5b3f7bb86a5aa0f68dcc9867c708f2158.tar.bz2 mitmproxy-d9db1cf5b3f7bb86a5aa0f68dcc9867c708f2158.zip |
Change size limit cmdline flag to -Z, enable size limits for replay.
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/cmdline.py | 14 | ||||
-rw-r--r-- | libmproxy/flow.py | 6 |
2 files changed, 12 insertions, 8 deletions
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index e368a30b..6d1ffa3d 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -55,12 +55,6 @@ def common_options(parser): help="Show event log." ) parser.add_option( - "-l", - action="store", dest="body_size_limit", default=None, - help="Byte size limit of HTTP request and response bodies."\ - " Understands k/m/g suffixes, i.e. 3m for 3 megabytes." - ) - parser.add_option( "-n", action="store_true", dest="no_server", help="Don't start a proxy server." @@ -120,7 +114,13 @@ def common_options(parser): action="store_true", dest="anticomp", default=False, help="Try to convince servers to send us un-compressed data." ) - + parser.add_option( + "-Z", + action="store", dest="body_size_limit", default=None, + metavar="SIZE", + help="Byte size limit of HTTP request and response bodies."\ + " Understands k/m/g suffixes, i.e. 3m for 3 megabytes." + ) group = optparse.OptionGroup(parser, "Client Replay") group.add_option( "-c", diff --git a/libmproxy/flow.py b/libmproxy/flow.py index e6ead002..63e6835e 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -1260,7 +1260,11 @@ class FlowMaster(controller.Master): f.response = None f.error = None self.process_new_request(f) - rt = proxy.RequestReplayThread(f, self.masterq, None) + rt = proxy.RequestReplayThread( + f, + self.masterq, + self.server.config.body_size_limit + ) rt.start() #end nocover |