mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 21:19:58 +09:00
Composer deps update
This commit is contained in:
35
vendor/symfony/http-foundation/Request.php
vendored
35
vendor/symfony/http-foundation/Request.php
vendored
@@ -545,10 +545,13 @@ class Request
|
||||
$requestOrder = ini_get('request_order') ?: ini_get('variables_order');
|
||||
$requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp';
|
||||
|
||||
$_REQUEST = array();
|
||||
$_REQUEST = array(array());
|
||||
|
||||
foreach (str_split($requestOrder) as $order) {
|
||||
$_REQUEST = array_merge($_REQUEST, $request[$order]);
|
||||
$_REQUEST[] = $request[$order];
|
||||
}
|
||||
|
||||
$_REQUEST = array_merge(...$_REQUEST);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1284,7 +1287,7 @@ class Request
|
||||
{
|
||||
$canonicalMimeType = null;
|
||||
if (false !== $pos = strpos($mimeType, ';')) {
|
||||
$canonicalMimeType = substr($mimeType, 0, $pos);
|
||||
$canonicalMimeType = trim(substr($mimeType, 0, $pos));
|
||||
}
|
||||
|
||||
if (null === static::$formats) {
|
||||
@@ -1448,7 +1451,7 @@ class Request
|
||||
*
|
||||
* @see https://tools.ietf.org/html/rfc7231#section-4.2.3
|
||||
*
|
||||
* @return bool
|
||||
* @return bool True for GET and HEAD, false otherwise
|
||||
*/
|
||||
public function isMethodCacheable()
|
||||
{
|
||||
@@ -1695,10 +1698,24 @@ class Request
|
||||
$this->server->remove('IIS_WasUrlRewritten');
|
||||
} elseif ($this->server->has('REQUEST_URI')) {
|
||||
$requestUri = $this->server->get('REQUEST_URI');
|
||||
// HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, only use URL path
|
||||
$schemeAndHttpHost = $this->getSchemeAndHttpHost();
|
||||
if (0 === strpos($requestUri, $schemeAndHttpHost)) {
|
||||
$requestUri = substr($requestUri, \strlen($schemeAndHttpHost));
|
||||
|
||||
if ('' !== $requestUri && '/' === $requestUri[0]) {
|
||||
// To only use path and query remove the fragment.
|
||||
if (false !== $pos = strpos($requestUri, '#')) {
|
||||
$requestUri = substr($requestUri, 0, $pos);
|
||||
}
|
||||
} else {
|
||||
// HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path,
|
||||
// only use URL path.
|
||||
$uriComponents = parse_url($requestUri);
|
||||
|
||||
if (isset($uriComponents['path'])) {
|
||||
$requestUri = $uriComponents['path'];
|
||||
}
|
||||
|
||||
if (isset($uriComponents['query'])) {
|
||||
$requestUri .= '?'.$uriComponents['query'];
|
||||
}
|
||||
}
|
||||
} elseif ($this->server->has('ORIG_PATH_INFO')) {
|
||||
// IIS 5.0, PHP as CGI
|
||||
@@ -1899,7 +1916,7 @@ class Request
|
||||
private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
|
||||
{
|
||||
if (self::$requestFactory) {
|
||||
$request = \call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content);
|
||||
$request = (self::$requestFactory)($query, $request, $attributes, $cookies, $files, $server, $content);
|
||||
|
||||
if (!$request instanceof self) {
|
||||
throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.');
|
||||
|
||||
Reference in New Issue
Block a user