mirror of
https://github.com/Av0idD4rk/firegex.git
synced 2026-10-23 16:31:00 +00:00
fix(nfproxy): prevent O(N²) memory growth from nested history snapshots
Objects archived in the history deques no longer carry their own _history snapshot, breaking the recursive chain where each historical entry held copies of all prior entries. The .history property on archived objects now returns an empty HttpHistory([], []) instead.
This commit is contained in:
parent
c71ad7c199
commit
9e4f93455b
@ -728,13 +728,9 @@ class InternalBasicHttpMetaClass:
|
||||
if msg.message_complete and not msg.added_to_history:
|
||||
msg.added_to_history = True
|
||||
if internal_data.current_pkt.is_input:
|
||||
full_req = HttpFullRequest(parser, msg)
|
||||
full_req._history = history_snapshot
|
||||
req_history_deque.append(full_req)
|
||||
req_history_deque.append(HttpFullRequest(parser, msg))
|
||||
else:
|
||||
full_resp = HttpFullResponse(parser, msg)
|
||||
full_resp._history = history_snapshot
|
||||
resp_history_deque.append(full_resp)
|
||||
resp_history_deque.append(HttpFullResponse(parser, msg))
|
||||
|
||||
if len(built_instances) == 1:
|
||||
res = built_instances[0]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user