From 69351741333bc3c7dd073e0cef007a1f1c6f8faf Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Sun, 13 Jul 2025 17:43:47 +0300 Subject: [PATCH] Fix to consider it a bad request only if there is one --- miniserv.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniserv.pl b/miniserv.pl index 7ffeb7f88..8bdea9f96 100755 --- a/miniserv.pl +++ b/miniserv.pl @@ -1407,7 +1407,7 @@ elsif (!$reqline && $checked_timeout > 1) { print DEBUG "handle_request: rejecting empty request\n"; return 0; } -elsif ($reqline !~ /^(\S+)\s+(.*)\s+HTTP\/1\..$/) { +elsif ($reqline && $reqline !~ /^(\S+)\s+(.*)\s+HTTP\/1\..$/) { &http_error(400, "Bad Request"); return 0; }