From 7b0ebca728364008c508678bedcc633303788043 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Fri, 13 Dec 2024 16:12:44 +0100 Subject: [PATCH] Ignore empty values for client hints --- 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':