From e64c30e5691e43f79de431c71d6bd0cdf37e4010 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Sun, 15 Jun 2025 01:36:12 +0100 Subject: [PATCH] Turn returned HTTP headers lowercase before parsing NGINX for some reason returns "content-length" instead of "Content-Length". --- src/Mp3FileRemote.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mp3FileRemote.php b/src/Mp3FileRemote.php index c6b18b3..9bfb5ac 100644 --- a/src/Mp3FileRemote.php +++ b/src/Mp3FileRemote.php @@ -52,7 +52,8 @@ class Mp3FileRemote ], ]); $result = get_headers($this->fileName, true, $context); - return $result['Content-Length']; + $result = array_change_key_case($result, CASE_LOWER); + return $result['content-length']; } /**