]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http: fixes stream flags for http tests
authorPhilippe Antoine <contact@catenacyber.fr>
Mon, 20 May 2019 10:47:35 +0000 (12:47 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 3 Sep 2019 08:06:10 +0000 (10:06 +0200)
src/tests/detect-http-server-body.c

index 7ea6d018c2569442ca048b1fce638c52b26f4688..2c768e3a29a806afb2b614c3d5576ca7201cb836 100644 (file)
@@ -5690,8 +5690,7 @@ static int DetectHttpServerBodyTest07(void)
         "HTTP/1.0 200 ok\r\n"
         "Content-Type: text/html\r\n"
         "Content-Length: 14\r\n"
-        "\r\n"
-        "message";
+        "\r\n";
     uint32_t http_len2 = sizeof(http_buf2) - 1;
     uint8_t http_buf3[] =
         "message";
@@ -5742,7 +5741,7 @@ static int DetectHttpServerBodyTest07(void)
 
     FLOWLOCK_WRLOCK(&f);
     int r = AppLayerParserParse(NULL, alp_tctx, &f, ALPROTO_HTTP,
-                                STREAM_TOSERVER | STREAM_START | STREAM_EOF,
+                                STREAM_TOSERVER | STREAM_START,
                                 http_buf1,
                                 http_len1);
     if (r != 0) {
@@ -6070,7 +6069,7 @@ static int DetectHttpServerBodyTest09(void)
 
     FLOWLOCK_WRLOCK(&f);
     r = AppLayerParserParse(NULL, alp_tctx, &f, ALPROTO_HTTP,
-                            STREAM_TOCLIENT | STREAM_EOF, http_buf3,
+                            STREAM_TOCLIENT, http_buf3,
                             http_len3);
     if (r != 0) {
         printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
@@ -6229,7 +6228,7 @@ static int DetectHttpServerBodyTest10(void)
 
     FLOWLOCK_WRLOCK(&f);
     r = AppLayerParserParse(NULL, alp_tctx, &f, ALPROTO_HTTP,
-                            STREAM_TOCLIENT | STREAM_EOF, http_buf3,
+                            STREAM_TOCLIENT, http_buf3,
                             http_len3);
     if (r != 0) {
         printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
@@ -7785,8 +7784,7 @@ static int DetectHttpServerBodyFileDataTest02(void)
         "HTTP/1.0 200 ok\r\n"
         "Content-Type: text/html\r\n"
         "Content-Length: 14\r\n"
-        "\r\n"
-        "message";
+        "\r\n";
     uint32_t http_len2 = sizeof(http_buf2) - 1;
     uint8_t http_buf3[] =
         "message";
@@ -7837,7 +7835,7 @@ static int DetectHttpServerBodyFileDataTest02(void)
 
     FLOWLOCK_WRLOCK(&f);
     int r = AppLayerParserParse(NULL, alp_tctx, &f, ALPROTO_HTTP,
-                                STREAM_TOSERVER | STREAM_START | STREAM_EOF,
+                                STREAM_TOSERVER | STREAM_START,
                                 http_buf1,
                                 http_len1);
     if (r != 0) {
@@ -8168,7 +8166,7 @@ static int DetectHttpServerBodyFileDataTest04(void)
 
     FLOWLOCK_WRLOCK(&f);
     r = AppLayerParserParse(NULL, alp_tctx, &f, ALPROTO_HTTP,
-                            STREAM_TOCLIENT | STREAM_EOF, http_buf3,
+                            STREAM_TOCLIENT, http_buf3,
                             http_len3);
     if (r != 0) {
         printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
@@ -8327,7 +8325,7 @@ static int DetectHttpServerBodyFileDataTest05(void)
 
     FLOWLOCK_WRLOCK(&f);
     r = AppLayerParserParse(NULL, alp_tctx, &f, ALPROTO_HTTP,
-                            STREAM_TOCLIENT | STREAM_EOF, http_buf3,
+                            STREAM_TOCLIENT, http_buf3,
                             http_len3);
     if (r != 0) {
         printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);