From d23609d2747ee513d9a8edb3087c07bfe01106d0 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Thu, 2 Jul 2026 22:26:12 +0100 Subject: [PATCH] Allow missing HEAD content length --- src/HttpBaseTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HttpBaseTest.php b/src/HttpBaseTest.php index 7e340ac..1852721 100644 --- a/src/HttpBaseTest.php +++ b/src/HttpBaseTest.php @@ -229,7 +229,7 @@ protected function assertRequest( $name = strtoupper(str_replace('-', '_', 'http-'.$name)); - if ('TRACE' === $method && 'HTTP_CONTENT_LENGTH' === $name && !isset($request['SERVER'][$name])) { + if (in_array($method, ['TRACE', 'HEAD'], true) && 'HTTP_CONTENT_LENGTH' === $name && !isset($request['SERVER'][$name])) { continue; }