]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
http: check that custom logging does not collide
authorPhilippe Antoine <contact@catenacyber.fr>
Wed, 30 Nov 2022 15:38:52 +0000 (16:38 +0100)
committerShivani Bhardwaj <shivanib134@gmail.com>
Mon, 12 Jun 2023 04:53:03 +0000 (10:23 +0530)
for content range header for instance

tests/http2-range/suricata.yaml [new file with mode: 0644]
tests/http2-range/test.yaml

diff --git a/tests/http2-range/suricata.yaml b/tests/http2-range/suricata.yaml
new file mode 100644 (file)
index 0000000..76791fe
--- /dev/null
@@ -0,0 +1,25 @@
+%YAML 1.1
+---
+
+outputs:
+  - eve-log:
+      enabled: yes
+      types:
+        - files
+        - stats
+        - http:
+           custom: [Content-Range]
+  - file-store:
+      version: 2
+      enabled: yes
+      force-filestore: yes
+      stream-depth: 0
+
+app-layer:
+  protocols:
+    http:
+      enabled: yes
+      libhtp:
+        default-config:
+          personality: IDS
+          response-body-limit: 100kb
index a3b204d970dbaa8389609426412b45fb75f5aa0e..058e97eeba9d4d5db1bdcd7d625bdff183303322 100644 (file)
@@ -15,6 +15,12 @@ checks:
       match:
         event_type: fileinfo
         fileinfo.size: 69
+  - filter:
+      count: 1
+      match:
+        event_type: http
+        http.response_headers[0].name: "Content-Range"
+        http.response_headers[0].value: "bytes 10-20/69"
   - filter:
       count: 0
       match: