# $Id: http-entity.bro,v 1.3 2002/10/26 03:50:11 vern Exp $

# Counts entity_level.

event http_begin_entity(c: connection, is_orig: bool)
	{
	local s = lookup_http_request_stream(c);
	local msg = get_http_message(s, is_orig);
	++msg$entity_level;
	}

event http_end_entity(c: connection, is_orig: bool)
	{
	local s = lookup_http_request_stream(c);
	local msg = get_http_message(s, is_orig);
	if ( msg$entity_level > 0 )
		--msg$entity_level;
	}
