__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* @see https://github.com/laminas/laminas-diactoros for the canonical source repository
* @copyright https://github.com/laminas/laminas-diactoros/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-diactoros/blob/master/LICENSE.md New BSD License
*/
declare(strict_types=1);
namespace Laminas\Diactoros;
use function is_callable;
/**
* Marshal the $_SERVER array
*
* Pre-processes and returns the $_SERVER superglobal. In particularly, it
* attempts to detect the Authorization header, which is often not aggregated
* correctly under various SAPI/httpd combinations.
*
* @param null|callable $apacheRequestHeaderCallback Callback that can be used to
* retrieve Apache request headers. This defaults to
* `apache_request_headers` under the Apache mod_php.
* @return array Either $server verbatim, or with an added HTTP_AUTHORIZATION header.
*/
function normalizeServer(array $server, callable $apacheRequestHeaderCallback = null) : array
{
if (null === $apacheRequestHeaderCallback && is_callable('apache_request_headers')) {
$apacheRequestHeaderCallback = 'apache_request_headers';
}
// If the HTTP_AUTHORIZATION value is already set, or the callback is not
// callable, we return verbatim
if (isset($server['HTTP_AUTHORIZATION'])
|| ! is_callable($apacheRequestHeaderCallback)
) {
return $server;
}
$apacheRequestHeaders = $apacheRequestHeaderCallback();
if (isset($apacheRequestHeaders['Authorization'])) {
$server['HTTP_AUTHORIZATION'] = $apacheRequestHeaders['Authorization'];
return $server;
}
if (isset($apacheRequestHeaders['authorization'])) {
$server['HTTP_AUTHORIZATION'] = $apacheRequestHeaders['authorization'];
return $server;
}
return $server;
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| create_uploaded_file.legacy.php | File | 619 B | 0664 |
|
| create_uploaded_file.php | File | 1.16 KB | 0664 |
|
| marshal_headers_from_sapi.legacy.php | File | 634 B | 0664 |
|
| marshal_headers_from_sapi.php | File | 1.6 KB | 0664 |
|
| marshal_method_from_sapi.legacy.php | File | 630 B | 0664 |
|
| marshal_method_from_sapi.php | File | 520 B | 0664 |
|
| marshal_protocol_version_from_sapi.legacy.php | File | 675 B | 0664 |
|
| marshal_protocol_version_from_sapi.php | File | 1008 B | 0664 |
|
| marshal_uri_from_sapi.legacy.php | File | 628 B | 0664 |
|
| marshal_uri_from_sapi.php | File | 6.66 KB | 0664 |
|
| normalize_server.legacy.php | File | 645 B | 0664 |
|
| normalize_server.php | File | 1.79 KB | 0664 |
|
| normalize_uploaded_files.legacy.php | File | 678 B | 0664 |
|
| normalize_uploaded_files.php | File | 4.21 KB | 0664 |
|
| parse_cookie_header.legacy.php | File | 609 B | 0664 |
|
| parse_cookie_header.php | File | 1.25 KB | 0664 |
|