From 6470e8646c002b516d18cee96f40606a69dfdf84 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 9 Feb 2024 00:17:00 +0000 Subject: tests: Stunt httpd: don't send body with 404 response to HEAD Closes: #1063341 Signed-off-by: Ian Jackson --- tests/http-static-server | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/http-static-server b/tests/http-static-server index f2f7cd0..723114e 100755 --- a/tests/http-static-server +++ b/tests/http-static-server @@ -71,10 +71,11 @@ sub handle_request { if (!$self->serve_static($cgi, $::webroot)) { print "HTTP/1.0 404 Not found\r\n"; - print $cgi->header, - $cgi->start_html('Not found'), + print $cgi->header; + print $cgi->start_html('Not found'), $cgi->h1('Not found'), - $cgi->end_html; + $cgi->end_html + if uc $cgi->request_method eq 'GET'; } } -- cgit v1.2.3