mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Change size limit cmdline flag to -Z, enable size limits for replay.
This commit is contained in:
parent
67f2610032
commit
d9db1cf5b3
@ -54,12 +54,6 @@ def common_options(parser):
|
|||||||
action="store_true", dest="eventlog",
|
action="store_true", dest="eventlog",
|
||||||
help="Show event log."
|
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(
|
parser.add_option(
|
||||||
"-n",
|
"-n",
|
||||||
action="store_true", dest="no_server",
|
action="store_true", dest="no_server",
|
||||||
@ -120,7 +114,13 @@ def common_options(parser):
|
|||||||
action="store_true", dest="anticomp", default=False,
|
action="store_true", dest="anticomp", default=False,
|
||||||
help="Try to convince servers to send us un-compressed data."
|
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 = optparse.OptionGroup(parser, "Client Replay")
|
||||||
group.add_option(
|
group.add_option(
|
||||||
"-c",
|
"-c",
|
||||||
|
@ -1260,7 +1260,11 @@ class FlowMaster(controller.Master):
|
|||||||
f.response = None
|
f.response = None
|
||||||
f.error = None
|
f.error = None
|
||||||
self.process_new_request(f)
|
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()
|
rt.start()
|
||||||
#end nocover
|
#end nocover
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user