actix / actix/actix-web

Add pattern syntax for optional trailing slash

Ouverte
#3,281 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
A-router A-web C-feature
Langage dominant
Rust
Étoiles
24.8k
Forks
1.9k
Merge moyen
23 h 10 min
PR mergées (30 j)
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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.