actix / actix/actix-web

Add pattern syntax for optional trailing slash

Open
#3,281 4 comments 0 reactions 0 assignees View on GitHub
A-router A-web C-feature
Dominant language
Rust
Stars
24.8k
Forks
1.9k
Avg merge
23h 10m
Merged PRs (30d)
26

Description

I proposed this idea in 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.