mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
This commit is contained in:
parent
7673eda07e
commit
330cdbe615
9054 changed files with 480487 additions and 41800 deletions
8
vendor/symfony/http-foundation/ServerBag.php
vendored
8
vendor/symfony/http-foundation/ServerBag.php
vendored
|
@ -22,16 +22,14 @@ class ServerBag extends ParameterBag
|
|||
{
|
||||
/**
|
||||
* Gets the HTTP headers.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getHeaders()
|
||||
public function getHeaders(): array
|
||||
{
|
||||
$headers = [];
|
||||
foreach ($this->parameters as $key => $value) {
|
||||
if (str_starts_with($key, 'HTTP_')) {
|
||||
$headers[substr($key, 5)] = $value;
|
||||
} elseif (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) {
|
||||
} elseif (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true) && '' !== $value) {
|
||||
$headers[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +49,7 @@ class ServerBag extends ParameterBag
|
|||
* RewriteCond %{HTTP:Authorization} .+
|
||||
* RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
|
||||
* RewriteCond %{REQUEST_FILENAME} !-f
|
||||
* RewriteRule ^(.*)$ app.php [QSA,L]
|
||||
* RewriteRule ^(.*)$ index.php [QSA,L]
|
||||
*/
|
||||
|
||||
$authorizationHeader = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue