Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6
This commit is contained in:
parent
db56c09587
commit
f1e72395cb
588 changed files with 26857 additions and 2777 deletions
44
vendor/symfony/browser-kit/Client.php
vendored
44
vendor/symfony/browser-kit/Client.php
vendored
|
@ -68,6 +68,16 @@ abstract class Client
|
|||
$this->followRedirects = (bool) $followRedirect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether client automatically follows redirects or not.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isFollowingRedirects()
|
||||
{
|
||||
return $this->followRedirects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum number of requests that crawler can follow.
|
||||
*
|
||||
|
@ -79,6 +89,16 @@ abstract class Client
|
|||
$this->followRedirects = -1 != $this->maxRedirects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum number of requests that crawler can follow.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getMaxRedirects()
|
||||
{
|
||||
return $this->maxRedirects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the insulated flag.
|
||||
*
|
||||
|
@ -103,7 +123,6 @@ abstract class Client
|
|||
public function setServerParameters(array $server)
|
||||
{
|
||||
$this->server = array_merge(array(
|
||||
'HTTP_HOST' => 'localhost',
|
||||
'HTTP_USER_AGENT' => 'Symfony2 BrowserKit',
|
||||
), $server);
|
||||
}
|
||||
|
@ -129,7 +148,7 @@ abstract class Client
|
|||
*/
|
||||
public function getServerParameter($key, $default = '')
|
||||
{
|
||||
return (isset($this->server[$key])) ? $this->server[$key] : $default;
|
||||
return isset($this->server[$key]) ? $this->server[$key] : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -266,21 +285,20 @@ abstract class Client
|
|||
|
||||
$uri = $this->getAbsoluteUri($uri);
|
||||
|
||||
if (!empty($server['HTTP_HOST'])) {
|
||||
$uri = preg_replace('{^(https?\://)'.preg_quote($this->extractHost($uri)).'}', '${1}'.$server['HTTP_HOST'], $uri);
|
||||
}
|
||||
$server = array_merge($this->server, $server);
|
||||
|
||||
if (isset($server['HTTPS'])) {
|
||||
$uri = preg_replace('{^'.parse_url($uri, PHP_URL_SCHEME).'}', $server['HTTPS'] ? 'https' : 'http', $uri);
|
||||
}
|
||||
|
||||
$server = array_merge($this->server, $server);
|
||||
|
||||
if (!$this->history->isEmpty()) {
|
||||
$server['HTTP_REFERER'] = $this->history->current()->getUri();
|
||||
}
|
||||
|
||||
$server['HTTP_HOST'] = $this->extractHost($uri);
|
||||
if (empty($server['HTTP_HOST'])) {
|
||||
$server['HTTP_HOST'] = $this->extractHost($uri);
|
||||
}
|
||||
|
||||
$server['HTTPS'] = 'https' == parse_url($uri, PHP_URL_SCHEME);
|
||||
|
||||
$this->internalRequest = new Request($uri, $method, $parameters, $files, $this->cookieJar->allValues($uri), $server, $content);
|
||||
|
@ -457,7 +475,7 @@ abstract class Client
|
|||
$request = $this->internalRequest;
|
||||
|
||||
if (in_array($this->internalResponse->getStatus(), array(302, 303))) {
|
||||
$method = 'get';
|
||||
$method = 'GET';
|
||||
$files = array();
|
||||
$content = null;
|
||||
} else {
|
||||
|
@ -466,7 +484,7 @@ abstract class Client
|
|||
$content = $request->getContent();
|
||||
}
|
||||
|
||||
if ('get' === strtolower($method)) {
|
||||
if ('GET' === strtoupper($method)) {
|
||||
// Don't forward parameters for GET request as it should reach the redirection URI
|
||||
$parameters = array();
|
||||
} else {
|
||||
|
@ -524,9 +542,9 @@ abstract class Client
|
|||
return parse_url($currentUri, PHP_URL_SCHEME).':'.$uri;
|
||||
}
|
||||
|
||||
// anchor?
|
||||
if (!$uri || '#' == $uri[0]) {
|
||||
return preg_replace('/#.*?$/', '', $currentUri).$uri;
|
||||
// anchor or query string parameters?
|
||||
if (!$uri || '#' == $uri[0] || '?' == $uri[0]) {
|
||||
return preg_replace('/[#?].*?$/', '', $currentUri).$uri;
|
||||
}
|
||||
|
||||
if ('/' !== $uri[0]) {
|
||||
|
|
Reference in a new issue