Double slash in URLs still breaks route matching with variable parts in vapor 4.92.0
weissi opened this issue · 2 comments
weissi commented
Consider this route
app.get(":variable", "fixed") { request in
return "ok \(#line)"
}
this should work fine for http://127.0.0.1:8080/testTeam/fixed
as well as http://127.0.0.1:8080//testTeam/fixed
. Unfortunately, it doesn't work for http://127.0.0.1:8080//testTeam/fixed
.
Actual:
$ curl http://127.0.0.1:8080/testTeam/fixed
ok 82
$ curl http://127.0.0.1:8080/testTeam//fixed
ok 82
$ curl http://127.0.0.1:8080//testTeam/fixed
{"reason":"Not Found","error":true}
$ curl http://127.0.0.1:8080//testTeam//fixed
{"error":true,"reason":"Not Found"}
Expected:
all printing ok 82
.
Version:
vapor 4.92.0