fix: [postTest] speculative fix for case sensitivity of headers

- as reported by @DavoDirty
pull/8870/head
iglocska 2023-01-02 12:29:33 +01:00
parent b8463ebbbf
commit e3d716b9a7
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 3 additions and 2 deletions

View File

@ -1691,8 +1691,9 @@ class ServersController extends AppController
if (!function_exists('getallheaders')) {
$headers = [];
foreach ($_SERVER as $name => $value) {
if (substr($name, 0, 5) === 'HTTP_') {
$headers[strtolower(str_replace('_', '-', substr($name, 5)))] = $value;
$name = strtolower($name);
if (substr($name, 0, 5) === 'http_') {
$headers[str_replace('_', '-', substr($name, 5))] = $value;
}
}
} else {