Skip to content

[Routing] Fixed scheme redirecting for root path #28120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2018

Conversation

twoleds
Copy link
Contributor

@twoleds twoleds commented Aug 2, 2018

Q A
Branch? 4.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

I and my friend found a bug with routing / matching and redirecting from http to https by forcing routes (https://symfony.com/doc/current/routing/scheme.html). It works good for all routes except the homepage (root path /). The problem is probably here (https://github.com/symfony/routing/blob/6912cfebc0ea4e7a46fdd15c9bd1f427dd39ff1b/Matcher/Dumper/PhpMatcherDumper.php#L196-L199). Symfony tries to display the welcome page instead of redirecting to https.

@twoleds twoleds force-pushed the fix-routing-redirect-homepage branch from cad3b36 to 2d7fdff Compare August 3, 2018 07:59
@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Aug 3, 2018
@nicolas-grekas
Copy link
Member

Thank you @twoleds.

@nicolas-grekas nicolas-grekas merged commit 2d7fdff into symfony:4.1 Aug 7, 2018
nicolas-grekas added a commit that referenced this pull request Aug 7, 2018
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] Fixed scheme redirecting for root path

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

I and my friend found a bug with routing / matching and redirecting from http to https by forcing routes (https://symfony.com/doc/current/routing/scheme.html). It works good for all routes except the homepage (root path /). The problem is probably here (https://github.com/symfony/routing/blob/6912cfebc0ea4e7a46fdd15c9bd1f427dd39ff1b/Matcher/Dumper/PhpMatcherDumper.php#L196-L199). Symfony tries to display the welcome page instead of redirecting to https.

Commits
-------

2d7fdff [Routing] Fixed scheme redirecting for root path
@fabpot fabpot mentioned this pull request Aug 28, 2018
@twoleds twoleds deleted the fix-routing-redirect-homepage branch May 4, 2022 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants