zeek/testing/btest/scripts/base/protocols/http/http-pending-state-growth.zeek
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

16 lines
560 B
Plaintext

# @TEST-DOC: Pcap has a gap for the server side. This previously caused unbounded state growth in c$http_state$pending.
#
# @TEST-EXEC: zcat <$TRACES/http/1000-requests-one-dropped-response.pcap.gz | zeek -C -b -r - %INPUT >out
# @TEST-EXEC: echo "total http.log lines" >>out
# @TEST-EXEC: grep -v '^#' http.log | wc -l | sed 's/ //g' >>out
# @TEST-EXEC: btest-diff out
# @TEST-EXEC: btest-diff weird.log
@load base/protocols/http
event connection_state_remove(c: connection)
{
if ( c?$http_state )
print "http_state pending", |c$http_state$pending|;
}