package updates
This commit is contained in:
23
vendor/symfony/http-foundation/Request.php
vendored
23
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,16 @@ 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));
|
||||
$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
|
||||
|
||||
Reference in New Issue
Block a user