Skip to content

Fix behavior of catch-all routes in 3.1 #21114

Closed
@rynowak

Description

@rynowak

Describe the bug

A number of routing features related to catch-all routes don't behave correctly in 3.1 due to a bug in how the routing DFA is built. This was fixed for 5.0 as part of #20801

See: #18677 and #16579 for examples of cases that are broken. Since this is a bug in how the DFA is built, there are many many cases that can reproduce this bug, but they generally involved a catch all route.

To Reproduce

See: #18677

How do I know if I'm impacted by this bug?

  • Do you have a catch-all route? {**foo} or similar
  • Is your catch all route failing to match requests it should match?
  • Does removing other routes make your catch-all start working?

If you answered yes to these questions, you are affected by this bug.

There are no known workarounds for this issue other than using a combination of routes that does not trigger the problem.

If it works for your scenario you could try configuring the order of a catch all route to come after other routes (higher numeric value of order). This may not be a good fit for your use case, and may not work if you have multiple routes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewares

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions