Skip to content

Route variable with slash at the end makes redirect #29673

Closed
@dzamyatin

Description

@dzamyatin

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