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

Add pattern syntax for optional trailing slash #3281

Open
tp971 opened this issue Feb 5, 2024 · 0 comments
Open

Add pattern syntax for optional trailing slash #3281

tp971 opened this issue Feb 5, 2024 · 0 comments
Labels
A-router project: router A-web project: actix-web C-feature Category: new functionality

Comments

@tp971
Copy link

tp971 commented Feb 5, 2024

I proposed this idea in #3258 (comment) to handle cases where trailing slashes are relevant. Basically, allow defining a route with a pattern like "/some/path/?" that matches both "/some/path" and "/some/path/". I also proposed to add a method to check whether the URI has a trailing slash, but that can also be done with request.uri().path().ends_with('/'), so idk whether we actually need this.

@robjtede robjtede added C-feature Category: new functionality A-router project: router A-web project: actix-web labels Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-router project: router A-web project: actix-web C-feature Category: new functionality
Projects
None yet
Development

No branches or pull requests

2 participants