zeek/testing/btest/scripts/base/protocols/http/http-09-content-length-confusion.zeek
Arne Welzel fbf9d53c44 HTTP: Reset reply_message for HTTP/0.9
OSS-Fuzz tickled an assert when sending a HTTP response before a HTTP/0.9
request. Avoid this by resetting reply_message upon seeing a HTTP/0.9 request.

PCAP was generated artificially: Server sending a reply providing a
Content-Length. Because HTTP/0.9 processing would remove the ContentLine
support analyzer, more data was delivered to the HTTP_Message than
expected, triggering an assert.

This is a follow-up for zeek/zeek#2851.
2023-03-13 14:13:50 +01:00

7 lines
318 B
Text

# @TEST-DOC: HTTP response with Content-Length followed by HTTP/0.9 request. This triggered an assert.
# @TEST-EXEC: zeek -b -Cr $TRACES/http/http-09-content-length-confusion.pcap %INPUT
# @TEST-EXEC: btest-diff http.log
# @TEST-EXEC: btest-diff weird.log
@load base/frameworks/notice/weird
@load base/protocols/http