Add pattern syntax for optional trailing slash
Maintainers usually reply within 1 day
@deepto98 is already working on this.
Since May 13, 2024.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the linked discussion to understand the proposed route-pattern behavior and any unresolved design questions. Trace how route patterns are parsed and matched, then define completion as a pattern such as "/some/path/?" matching both slash variants without changing other routing behavior; add coverage for both request paths.
Written by the indexing model from the issue text.
Description
I proposed this idea in https://github.com/actix/actix-web/discussions/3258#discussioncomment-8358174 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.
- Dominant language
- Rust
- Stars
- 24.9k
- Forks
- 2k
- Avg merge
- 19h 9m
- Merged PRs (30d)
- 61
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from actix/actix-web
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[actix-multipart] Generic "Payload error" when request exceeds size limitPossibly taken @robjtede claimed this 47 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
actix/actix-web#4168 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Change `HttpRequest::content_type` to return `Option<&str>`Possibly taken @Sruhvx-jpg claimed this 65 days ago. OpenA-http
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
actix/actix-web#3797 · 1 comment ·
Maintainers usually reply within 1 day
-
A-web C-improvement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
actix/actix-web#2666 · 4 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
A-http A-web
Difficulty 4/5 3-5 days Newbie friendliness 20/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/aws-emulator#30 · 1 comment ·
-
tormach-plasma refusal text with no machine reads "no machine is not declared a plasma machine"Openarea:post bug effort:low P2 source:agent
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Chat images never show without ImageMagick: ffprobe fallback uses an option string ffprobe 9 rejectsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
eliasstravik/herdr-projects#1011 ·
-
design-data-spec
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
adobe/spectrum-design-data#1744 ·
Maintainers usually reply within 1 day