8000 Fix merge · symfony/symfony@01ccae8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 01ccae8

Browse files
Fix merge
1 parent 45145a9 commit 01ccae8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ private function compileRoute(Route $route, $name, $supportsRedirections, $paren
327327
$code .= <<<EOF
328328
\$requiredSchemes = $schemes;
329329
if (!isset(\$requiredSchemes[\$context->getScheme()])) {
330-
if (!in_array(\$this->context->getMethod(), array('HEAD', 'GET'))) {
330+
if ('GET' !== \$canonicalMethod) {
331331
\$allow[] = 'GET';
332332
goto $gotoname;
333333
}

src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public function match($rawPathinfo)
347347
$ret = array('_route' => 'secure');
348348
$requiredSchemes = array ( 'https' => 0,);
349349
if (!isset($requiredSchemes[$context->getScheme()])) {
350-
if (!in_array($this->context->getMethod(), array('HEAD', 'GET'))) {
350+
if ('GET' !== $canonicalMethod) {
351351
$allow[] = 'GET';
352352
goto not_secure;
353353
}
@@ -364,7 +364,7 @@ public function match($rawPathinfo)
364364
$ret = array('_route' => 'nonsecure');
365365
$requiredSchemes = array ( 'http' => 0,);
366366
if (!isset($requiredSchemes[$context->getScheme()])) {
367-
if (!in_array($this->context->getMethod(), array('HEAD', 'GET'))) {
367+
if ('GET' !== $canonicalMethod) {
368368
$allow[] = 'GET';
369369
goto not_nonsecure;
370370
}

0 commit comments

Comments
 (0)
0