mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Do not check X-Powered-By header in FPM tester if expose_php off
Closes GH-9508
This commit is contained in:
@@ -102,7 +102,7 @@ class Response
|
||||
/**
|
||||
* Expect header in the response.
|
||||
*
|
||||
* @param string $name Header name.
|
||||
* @param string $name Header name.
|
||||
* @param string $value Header value.
|
||||
*
|
||||
* @return Response
|
||||
@@ -226,7 +226,7 @@ class Response
|
||||
{
|
||||
// check default headers
|
||||
return (
|
||||
$this->checkHeader('X-Powered-By', '|^PHP/8|', true) &&
|
||||
( ! ini_get('expose_php') || $this->checkHeader('X-Powered-By', '|^PHP/8|', true)) &&
|
||||
$this->checkHeader('Content-type', '|^' . $contentType . '(;\s?charset=\w+)?|', true)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user