From fa3519097f2dd81519f2678f7e172397b861a438 Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Sun, 15 Dec 2024 10:48:57 +0100 Subject: [PATCH] Ignore empty values for client hints (#7949) --- ClientHints.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ClientHints.php b/ClientHints.php index 6b4295a6f9..cd98c073be 100644 --- a/ClientHints.php +++ b/ClientHints.php @@ -259,6 +259,10 @@ public static function factory(array $headers): ClientHints $formFactors = []; foreach ($headers as $name => $value) { + if (empty($value)) { + continue; + } + switch (\str_replace('_', '-', \strtolower((string) $name))) { case 'http-sec-ch-ua-arch': case 'sec-ch-ua-arch':