Change size limit cmdline flag to -Z, enable size limits for replay.

This commit is contained in:
Aldo Cortesi 2011-09-09 17:31:36 +12:00
parent 67f2610032
commit d9db1cf5b3
3 changed files with 12 additions and 9 deletions

View File

@ -54,12 +54,6 @@ def common_options(parser):
action="store_true", dest="eventlog",
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",
@ -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",

View File

@ -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

View File

@ -58,7 +58,6 @@ if __name__ == '__main__':
opts.intercept = options.intercept
opts.debug = options.debug
m = console.ConsoleMaster(server, opts)
m.run()