http: fixes stream flags for http tests

pull/4159/head
Philippe Antoine 6 years ago committed by Victor Julien
parent 9665ab0409
commit 8d4cbb3f7b

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

Loading…
Cancel
Save