Merge branch '3.4' into 4.0

* 3.4:
  Fix merge
This commit is contained in:
Nicolas Grekas 2018-02-12 19:00:17 +01:00
commit bc21af22d7
2 changed files with 3 additions and 3 deletions

View File

@ -327,7 +327,7 @@ EOF;
$code .= <<<EOF
\$requiredSchemes = $schemes;
if (!isset(\$requiredSchemes[\$context->getScheme()])) {
if (!in_array(\$this->context->getMethod(), array('HEAD', 'GET'))) {
if ('GET' !== \$canonicalMethod) {
\$allow[] = 'GET';
goto $gotoname;
}

View File

@ -347,7 +347,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec
$ret = array('_route' => 'secure');
$requiredSchemes = array ( 'https' => 0,);
if (!isset($requiredSchemes[$context->getScheme()])) {
if (!in_array($this->context->getMethod(), array('HEAD', 'GET'))) {
if ('GET' !== $canonicalMethod) {
$allow[] = 'GET';
goto not_secure;
}
@ -364,7 +364,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec
$ret = array('_route' => 'nonsecure');
$requiredSchemes = array ( 'http' => 0,);
if (!isset($requiredSchemes[$context->getScheme()])) {
if (!in_array($this->context->getMethod(), array('HEAD', 'GET'))) {
if ('GET' !== $canonicalMethod) {
$allow[] = 'GET';
goto not_nonsecure;
}