From: Philippe Antoine Date: Mon, 13 Jul 2020 07:53:03 +0000 (+0200) Subject: http: adds test with double gap X-Git-Tag: suricata-6.0.4~241 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1946369ab0db2b4e3e344a100b1d85f9927ae6aa;p=thirdparty%2Fsuricata-verify.git http: adds test with double gap --- diff --git a/tests/http-gap-double/README.md b/tests/http-gap-double/README.md new file mode 100644 index 000000000..0c8fe5493 --- /dev/null +++ b/tests/http-gap-double/README.md @@ -0,0 +1,13 @@ +# Description + +Test http gap handling + +This test case contains a single simple gap in response body with defined content-length + +# PCAP + +The pcap comes from running +`python test/htptopcap.py toaddgap.txt` +With the attached toaddgap.txt from test http-gap-simple + +Then removing packets 17 and 21 diff --git a/tests/http-gap-double/input.pcap b/tests/http-gap-double/input.pcap new file mode 100644 index 000000000..db64cc13b Binary files /dev/null and b/tests/http-gap-double/input.pcap differ diff --git a/tests/http-gap-double/test.yaml b/tests/http-gap-double/test.yaml new file mode 100644 index 000000000..c47eb7973 --- /dev/null +++ b/tests/http-gap-double/test.yaml @@ -0,0 +1,44 @@ +requires: + features: + - HAVE_LIBJANSSON + min-version: 6.0.0 + +# disables checksum verification +args: + - -k none + +checks: + + # Check that there is one file event with content range. + - filter: + count: 1 + match: + event_type: http + http.url: "/1" + http.status: 200 + - filter: + count: 1 + match: + event_type: http + http.url: "/2" + http.status: 200 + - filter: + count: 1 + match: + event_type: http + http.url: "/3" + http.status: 200 + - filter: + count: 2 + match: + event_type: fileinfo + fileinfo.size: 14 + fileinfo.state: "CLOSED" + fileinfo.gaps: false + - filter: + count: 1 + match: + event_type: fileinfo + fileinfo.size: 70 + fileinfo.state: "TRUNCATED" + fileinfo.gaps: true