From: Philippe Antoine Date: Thu, 4 Apr 2019 18:55:51 +0000 (+0200) Subject: Adds test case for http range logging X-Git-Tag: suricata-6.0.4~473 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f99475e6aa87c071bcc7a4e15b8dfcbb058c5474;p=thirdparty%2Fsuricata-verify.git Adds test case for http range logging --- diff --git a/tests/http-range/README.md b/tests/http-range/README.md new file mode 100644 index 000000000..a3d349f06 --- /dev/null +++ b/tests/http-range/README.md @@ -0,0 +1,8 @@ +# Description + +Test http content range logging. + +# PCAP + +The pcap comes from running +`curl http://i.imgur.com/z4d4kWk.jpg -i -H "Range: bytes=500-1000"` diff --git a/tests/http-range/input.pcap b/tests/http-range/input.pcap new file mode 100644 index 000000000..dc92bd963 Binary files /dev/null and b/tests/http-range/input.pcap differ diff --git a/tests/http-range/test.yaml b/tests/http-range/test.yaml new file mode 100644 index 000000000..dd667d4ef --- /dev/null +++ b/tests/http-range/test.yaml @@ -0,0 +1,21 @@ +requires: + features: + - HAVE_LIBJANSSON + +# disables checksum verification +args: + - -k none + +checks: + + # Check that there is one file event with content range. + - filter: + count: 1 + match: + event_type: fileinfo + http.content_range.raw: bytes 500-1000/146515 + http.content_range.start: 500 + http.content_range.end: 1000 + http.content_range.size: 146515 + fileinfo.start: 500 + fileinfo.end: 1000