MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / request

Function request

test/helper_tools/memoryleak.py:31–45  ·  view source on GitHub ↗
(ctx, flow)

Source from the content-addressed store, hash-verified

29
30
31def request(ctx, flow):
32 global step, ssl
33 print("==========")
34 print(f"GC: {gc.collect()}")
35 print(f"Threads: {threading.active_count()}")
36
37 step += 1
38 if step == 1:
39 all_objects = muppy.get_objects()
40 ssl = muppy.filter(all_objects, SSL.Connection)[0]
41 if step == 2:
42 ib = refbrowser.InteractiveBrowser(ssl, 2, str_fun, repeat=False)
43 del ssl # do this to unpollute view
44 ib.main(True)
45 # print("\r\n".join(str(x)[:100] for x in gc.get_referrers(ssl)))

Callers

nothing calls this directly

Calls 2

filterMethod · 0.45
mainMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…