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

[NFR]: Micro removeExtraSlashes should be false by default #14920

Closed
andrew-s opened this issue Mar 17, 2020 · 1 comment
Closed

[NFR]: Micro removeExtraSlashes should be false by default #14920

andrew-s opened this issue Mar 17, 2020 · 1 comment
Labels
new feature request Planned Feature or New Feature Request

Comments

@andrew-s
Copy link

Is your feature request related to a problem? Please describe.
When using the Micro controller, the router gets removeExtraSlashes set to true by default. It's not mentioned in the documentation but, I think this is a little misleading as it removes any trailing slash on the function (while my URI remains static).

There's an argument that if I explicitly define say /profiles/{slug}/ then I'd expect that to match be the both the minimum and maximum, I'm unsure as the reason to post-process all routes.

See;

router->removeExtraSlashes(true);

Describe the solution you'd like
There's multiple solutions to this problem;

  • Update the documentation to highlight this happens by default (maintains backwards compatibility) and add examples - however, this doesn't fix the illogical naming nor what it does
  • Update the Micro framework to have removeExtraSlashes set to false by default (as I presume it is elsewhere?) and update the documentation on how to enable it
  • Rename removeExtraSlashes to be removeTrailingSlash (which seems to be what it actually does) and set it to false by default (with updated documentation in all the relevant places) (this is the most backward breaking change, but likely the one that makes the most sense)

Happy to help make any relevant change/PR (or even just update any documentation) given the direction the project chooses.

@andrew-s andrew-s added the new feature request Planned Feature or New Feature Request label Mar 17, 2020
@niden
Copy link
Sponsor Member

niden commented Apr 10, 2020

This is tracked in #14608. Please vote if you want this feature.

@niden niden closed this as completed Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature request Planned Feature or New Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants