From: Philippe Antoine Date: Mon, 20 May 2019 10:47:35 +0000 (+0200) Subject: http: fixes stream flags for http tests X-Git-Tag: suricata-5.0.0-rc1~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d4cbb3f7bd8ea724cbe7bdba1a501888ccb0fb8;p=thirdparty%2Fsuricata.git http: fixes stream flags for http tests --- diff --git a/src/tests/detect-http-server-body.c b/src/tests/detect-http-server-body.c index 7ea6d018c2..2c768e3a29 100644 --- a/src/tests/detect-http-server-body.c +++ b/src/tests/detect-http-server-body.c @@ -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);