Skip to content
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

[Routing] fix trailing slash redirection #29373

Merged
merged 1 commit into from Nov 29, 2018

Conversation

Projects
None yet
4 participants
@nicolas-grekas
Copy link
Member

commented Nov 29, 2018

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

@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Nov 29, 2018

@nicolas-grekas nicolas-grekas merged commit fbaba23 into symfony:4.1 Nov 29, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

nicolas-grekas added a commit that referenced this pull request Nov 29, 2018

bug #29373 [Routing] fix trailing slash redirection (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] fix trailing slash redirection

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

Commits
-------

fbaba23 [Routing] fix trailing slash redirection

@nicolas-grekas nicolas-grekas deleted the nicolas-grekas:route-fix branch Nov 29, 2018

@jimmycleuren

This comment has been minimized.

Copy link

commented Nov 29, 2018

Hm, this does not seem to fix the issue for me.

Btw, what is the easiest/best way to check this ? I manually copy/pasted your changes in my vendor folder now.

@nicolas-grekas

This comment has been minimized.

Copy link
Member Author

commented Nov 29, 2018

Now that it's merged, you can require ~4.1@dev I think. Copy/pasting in vendor works also.
About your issue, without a reproducer, I'm can't to anything I'm afraid.
I think you have a route earlier in the list that takes precedence. Is it legit or not? I can't tell without having it :)

@rodrigonull

This comment has been minimized.

Copy link

commented Nov 29, 2018

I don't know if is the same issue, but I have a problem with the route /{id}/

The route matches but the id parameter value is appended with the '/'.

For example /1/ . The id value should be "1" but i get "1/"

This problem began with version 4.1.8 and with this patch the problem remains.

@nicolas-grekas

This comment has been minimized.

Copy link
Member Author

commented Nov 29, 2018

any reproducer?

@jimmycleuren

This comment has been minimized.

Copy link

commented Nov 29, 2018

I've created a demo app to reproduce the issue. If you try to access /user/ or /admin/, you'll get the error while those routes are ok according to debug:router.

https://github.com/jimmycleuren/routing-issue

@nicolas-grekas

This comment has been minimized.

Copy link
Member Author

commented Nov 30, 2018

@jimmycleuren thanks understood, I'm on it (#29380 fixes it but is still not finished)

This was referenced Nov 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.