actix / actix/actix-web

Add pattern syntax for optional trailing slash

Offen
#3,281 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
A-router A-web C-feature
Vorherrschende Sprache
Rust
Sterne
24.8k
Forks
1.9k
Ø Merge
23 Std. 10 Min.
Gemergte PRs (30 T.)
26

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.