Fix merge

This commit is contained in:
Nicolas Grekas 2018-02-12 19:00:05 +01:00
parent 45145a9f3a
commit 01ccae828c
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;
}