{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/29438","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/29438/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/29438/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/29438/events","html_url":"https://github.com/symfony/symfony/issues/29438","id":386773127,"node_id":"MDU6SXNzdWUzODY3NzMxMjc=","number":29438,"title":"[Routing] Route with trailing slash redirects to route without slash","user":{"login":"emodric","id":362286,"node_id":"MDQ6VXNlcjM2MjI4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/362286?v=4","gravatar_id":"","url":"https://api.github.com/users/emodric","html_url":"https://github.com/emodric","followers_url":"https://api.github.com/users/emodric/followers","following_url":"https://api.github.com/users/emodric/following{/other_user}","gists_url":"https://api.github.com/users/emodric/gists{/gist_id}","starred_url":"https://api.github.com/users/emodric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emodric/subscriptions","organizations_url":"https://api.github.com/users/emodric/orgs","repos_url":"https://api.github.com/users/emodric/repos","events_url":"https://api.github.com/users/emodric/events{/privacy}","received_events_url":"https://api.github.com/users/emodric/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-03T11:23:56Z","updated_at":"2018-12-03T11:58:17Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Symfony version(s) affected**: 4.2.0 and 4.1.8\r\n\r\n**Description**  \r\n\r\nI have two routes, one without slash, one with the slash, and with 4.2.0 and 4.1.8, there is a redirect from the route with the slash to the route without the slash, causing infinite redirect loop between the two (obviously because the no-slash route redirects back to slash route). https://github.com/symfony/symfony/pull/29380 also does not fix the issue.\r\n\r\nThis works fine on Symfony 4.1.7 and latest 3.4, i.e. no redirect happens from slash route to no-slash route.\r\n\r\n**How to reproduce** \r\n\r\nThe following routes cause the problem:\r\n\r\n```\r\ntest_route_no_slash:\r\n    path: /foo\r\n    methods: [GET]\r\n    defaults:\r\n        _controller: \"Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\RedirectController::redirectAction\"\r\n        route: test_route\r\n        permanent: true\r\n\r\ntest_route:\r\n    path: /foo/\r\n    methods: [GET]\r\n    defaults:\r\n        _controller: \"App\\\\Controller\\\\FooController\"\r\n```\r\n\r\nReproducer is available at  https://github.com/emodric/sf_route_redirect_bug\r\n\r\nStart the server and open `/foo` to get the infinite redirects."},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/443685845","html_url":"https://github.com/symfony/symfony/issues/29438#issuecomment-443685845","issue_url":"https://api.github.com/repos/symfony/symfony/issues/29438","id":443685845,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzY4NTg0NQ==","user":{"login":"emodric","id":362286,"node_id":"MDQ6VXNlcjM2MjI4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/362286?v=4","gravatar_id":"","url":"https://api.github.com/users/emodric","html_url":"https://github.com/emodric","followers_url":"https://api.github.com/users/emodric/followers","following_url":"https://api.github.com/users/emodric/following{/other_user}","gists_url":"https://api.github.com/users/emodric/gists{/gist_id}","starred_url":"https://api.github.com/users/emodric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emodric/subscriptions","organizations_url":"https://api.github.com/users/emodric/orgs","repos_url":"https://api.github.com/users/emodric/repos","events_url":"https://api.github.com/users/emodric/events{/privacy}","received_events_url":"https://api.github.com/users/emodric/received_events","type":"User","site_admin":false},"created_at":"2018-12-03T11:58:17Z","updated_at":"2018-12-03T11:58:17Z","author_association":"CONTRIBUTOR","body":"Thanks for the pointers to the previous discussions @dkarlovi.\r\n\r\n@nicolas-grekas Should I close this then?"}}
{"actor":{"display_login":"emodric"}}