Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Route variable with slash at the end makes redirect #29673

Copy link
Copy link
Closed
@dzamyatin

Description

@dzamyatin
Issue body actions

Symfony version(s) affected: 4.2.1

Description
I have a redirect problem with urls which contain variable with part of some path at the end, like this:

foo/somefolder/somefolder/

My route config for this looks like:

/**
     *@Route(
     *     "/some/{path}",
     *     methods={"GET"},
     *     requirements={"path"=".+"}
     * )
*/

The problem is when variable path contain slash at the end of string i get redirect to path without slash but the slash it is a part of variable

Possible Solution
Check if the end of the route is a variable don't make a redirect

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.