diff --git a/tests/http1-noint-status/README.md b/tests/http1-noint-status/README.md new file mode 100644 index 000000000..42f8da150 --- /dev/null +++ b/tests/http1-noint-status/README.md @@ -0,0 +1,11 @@ +# Description + +Test HTTP1 log of invalid status + +https://redmine.openinfosecfoundation.org/issues/7311 + +# PCAP + +The pcap is crafted with +`curl http://127.0.0.1:8001/test` as client +and custom server.py as server diff --git a/tests/http1-noint-status/input.pcap b/tests/http1-noint-status/input.pcap new file mode 100644 index 000000000..fdd5f5f36 Binary files /dev/null and b/tests/http1-noint-status/input.pcap differ diff --git a/tests/http1-noint-status/server.py b/tests/http1-noint-status/server.py new file mode 100644 index 000000000..32e12cdc5 --- /dev/null +++ b/tests/http1-noint-status/server.py @@ -0,0 +1,18 @@ +#! /usr/bin/env python + +# @author: Philippe Antoine + +import sys +import binascii +from threading import Thread +import time +import socket + +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.bind(("127.0.0.1", 8001)) +s.listen(1) +conn, addr = s.accept() +data = conn.recv(1024) +conn.send(b"HTTP/1.0 2XX OK\nServer: POC\nContent-Length:4\n\ntoto") +conn.close() +s.close() diff --git a/tests/http1-noint-status/test.yaml b/tests/http1-noint-status/test.yaml new file mode 100644 index 000000000..b3691ed06 --- /dev/null +++ b/tests/http1-noint-status/test.yaml @@ -0,0 +1,13 @@ +requires: + min-version: 8 + +# disables checksum verification +args: + - -k none + +checks: + - filter: + count: 1 + match: + event_type: http + http.status_str: 2XX