From b72fd726c02fe5d268eda54e797452bc6db8f09e Mon Sep 17 00:00:00 2001 From: Rafael Kraut <14234815+RafaelKr@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:32:44 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Trim=20one=20optional=20leading?= =?UTF-8?q?=20space=20from=20headers=20(#405)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Roots/Acorn/Application/Concerns/Bootable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Roots/Acorn/Application/Concerns/Bootable.php b/src/Roots/Acorn/Application/Concerns/Bootable.php index c0052b17..9b119916 100644 --- a/src/Roots/Acorn/Application/Concerns/Bootable.php +++ b/src/Roots/Acorn/Application/Concerns/Bootable.php @@ -143,7 +143,7 @@ protected function registerDefaultRoute(): void { Route::any('{any?}', fn () => tap(response(''), function (Response $response) { foreach (headers_list() as $header) { - [$header, $value] = explode(':', $header, 2); + [$header, $value] = preg_split("/:\s{0,1}/", $header, 2); if (! headers_sent()) { header_remove($header);