]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
http: adds test with HTTP not being 0.9
authorPhilippe Antoine <pantoine@oisf.net>
Mon, 11 Mar 2024 10:14:36 +0000 (11:14 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 2 May 2024 17:49:29 +0000 (19:49 +0200)
Ticket: 6757

In the case we have too many whitespaces after the request

tests/http-not09-spaces/README.md [new file with mode: 0644]
tests/http-not09-spaces/input.pcap [new file with mode: 0644]
tests/http-not09-spaces/test.yaml [new file with mode: 0644]

diff --git a/tests/http-not09-spaces/README.md b/tests/http-not09-spaces/README.md
new file mode 100644 (file)
index 0000000..c7f7a8e
--- /dev/null
@@ -0,0 +1,11 @@
+# Test Description
+
+Test that we parse weird HTTP (adding lots of whitespaces) not as HTTP/0.9
+
+## PCAP
+
+Crafted by running server `python3 -m http.server 8000` and a dummy client sending hardcoded data
+
+## Related issues
+
+https://redmine.openinfosecfoundation.org/issues/6757
diff --git a/tests/http-not09-spaces/input.pcap b/tests/http-not09-spaces/input.pcap
new file mode 100644 (file)
index 0000000..908836c
Binary files /dev/null and b/tests/http-not09-spaces/input.pcap differ
diff --git a/tests/http-not09-spaces/test.yaml b/tests/http-not09-spaces/test.yaml
new file mode 100644 (file)
index 0000000..c3173e5
--- /dev/null
@@ -0,0 +1,12 @@
+requires:
+  min-version: 8
+
+args:
+  - -k none
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: anomaly
+        anomaly.event: REQUEST_LINE_MISSING_PROTOCOL