diff --git a/src/functions/marshal_headers_from_sapi.php b/src/functions/marshal_headers_from_sapi.php index 253f2c4b..ab493e22 100644 --- a/src/functions/marshal_headers_from_sapi.php +++ b/src/functions/marshal_headers_from_sapi.php @@ -35,13 +35,13 @@ function marshalHeadersFromSapi(array $server) : array } } - if (($value || $value === "0") && strpos($key, 'HTTP_') === 0) { + if ($value != '' && strpos($key, 'HTTP_') === 0) { $name = strtr(strtolower(substr($key, 5)), '_', '-'); $headers[$name] = $value; continue; } - if ($value && strpos($key, 'CONTENT_') === 0) { + if ($value != '' && strpos($key, 'CONTENT_') === 0) { $name = 'content-' . strtolower(substr($key, 8)); $headers[$name] = $value; continue;