]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http body: fix compression tests 2140/head
authorVictor Julien <victor@inliniac.net>
Mon, 30 May 2016 12:55:34 +0000 (14:55 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 7 Jun 2016 11:10:21 +0000 (13:10 +0200)
src/detect-engine-hsbd.c

index 18fba7010a9bd572daf214a25b1876b65cb9880d..100134314e30316255b7309b30d30d8c6cad0c88 100644 (file)
@@ -3087,10 +3087,9 @@ static int DetectEngineHttpServerBodyTest20(void)
     /* do detect */
     SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
 
-    if (PacketAlertCheck(p2, 1)) {
-        printf("sid 1 matched but shouldn't have");
-        goto end;
-    }
+#ifdef HAVE_HTP_CONFIG_SET_RESPONSE_DECOMPRESSION_LAYER_LIMIT
+    FAIL_IF(!(PacketAlertCheck(p2, 1)));
+#endif
 
     result = 1;
 
@@ -3219,10 +3218,9 @@ static int DetectEngineHttpServerBodyTest21(void)
     /* do detect */
     SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
 
-    if (PacketAlertCheck(p2, 1)) {
-        printf("sid 1 matched but shouldn't have");
-        goto end;
-    }
+#ifdef HAVE_HTP_CONFIG_SET_RESPONSE_DECOMPRESSION_LAYER_LIMIT
+    FAIL_IF(!(PacketAlertCheck(p2, 1)));
+#endif
 
     result = 1;
 
@@ -3353,10 +3351,9 @@ static int DetectEngineHttpServerBodyTest22(void)
     /* do detect */
     SigMatchSignatures(&th_v, de_ctx, det_ctx, p2);
 
-    if (!(PacketAlertCheck(p2, 1))) {
-        printf("sid 1 should have matched: ");
-        goto end;
-    }
+#ifdef HAVE_HTP_CONFIG_SET_RESPONSE_DECOMPRESSION_LAYER_LIMIT
+    FAIL_IF(!(PacketAlertCheck(p2, 1)));
+#endif
 
     result = 1;