mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-12-01 19:48:34 +00:00
Generate better function names for root url. (#1100)
This commit is contained in:
parent
66267ad276
commit
acaca765e4
@ -128,7 +128,9 @@ def locust_code(flow):
|
|||||||
file_name = "_".join(components)
|
file_name = "_".join(components)
|
||||||
name = re.sub('\W|^(?=\d)', '_', file_name)
|
name = re.sub('\W|^(?=\d)', '_', file_name)
|
||||||
url = flow.request.scheme + "://" + flow.request.host + "/" + "/".join(components)
|
url = flow.request.scheme + "://" + flow.request.host + "/" + "/".join(components)
|
||||||
|
if name == "" or name is None:
|
||||||
|
new_name = "_".join([str(flow.request.host) , str(flow.request.timestamp_start)])
|
||||||
|
name = re.sub('\W|^(?=\d)', '_', new_name)
|
||||||
args = ""
|
args = ""
|
||||||
headers = ""
|
headers = ""
|
||||||
if flow.request.headers:
|
if flow.request.headers:
|
||||||
|
Loading…
Reference in New Issue
Block a user