From: Anoop Saldanha Date: Sat, 17 Aug 2013 12:19:47 +0000 (+0530) Subject: Update htp event handler to both warning and error events regardless of any conditions. X-Git-Tag: suricata-2.0beta2~291 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e4eec200f70966036de19e2972ce1e1a19d3ef6;p=thirdparty%2Fsuricata.git Update htp event handler to both warning and error events regardless of any conditions. --- diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index f3bd657bee..2b049a4b18 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -656,7 +656,6 @@ static int HTPHandleRequestData(Flow *f, void *htp_state, switch(r) { case HTP_STREAM_ERROR: - HTPHandleError(hstate); hstate->flags |= HTP_FLAG_STATE_ERROR; hstate->flags &= ~HTP_FLAG_STATE_DATA; @@ -665,17 +664,17 @@ static int HTPHandleRequestData(Flow *f, void *htp_state, break; case HTP_STREAM_DATA: case HTP_STREAM_DATA_OTHER: - HTPHandleWarning(hstate); hstate->flags |= HTP_FLAG_STATE_DATA; break; case HTP_STREAM_TUNNEL: break; default: - HTPHandleWarning(hstate); hstate->flags &= ~HTP_FLAG_STATE_DATA; hstate->flags &= ~HTP_FLAG_NEW_BODY_SET; } + HTPHandleWarning(hstate); + HTPHandleError(hstate); /* if the TCP connection is closed, then close the HTTP connection */ if ((pstate->flags & APP_LAYER_PARSER_EOF) &&