]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Update htp event handler to both warning and error events regardless of any conditions.
authorAnoop Saldanha <anoopsaldanha@gmail.com>
Sat, 17 Aug 2013 12:19:47 +0000 (17:49 +0530)
committerAnoop Saldanha <anoopsaldanha@gmail.com>
Sun, 29 Sep 2013 17:43:10 +0000 (23:13 +0530)
src/app-layer-htp.c

index f3bd657bee223e32c3353f2a5d9125e586b387d5..2b049a4b18cdd19f85ce217716bcdeb023dd2b2f 100644 (file)
@@ -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) &&