1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 04:51:56 +00:00

add my new trie data structure implementation written from scratch and specifically designed for HTTP (and Iris) - see https://github.com/kataras/muxie for the net/http version of it

Former-commit-id: 4eed1585f29b57418b61f6de058f5d6db4bb98bf
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-10-15 10:49:09 +03:00
parent 29a4354e1d
commit 3002736086
24 changed files with 575 additions and 648 deletions

View File

@@ -37,7 +37,7 @@ func (r *customRouter) HandleRequest(ctx context.Context) {
parts := strings.Split(path, "/")[1:]
staticPath := "/" + parts[0]
for _, route := range r.provider.GetRoutes() {
if strings.HasPrefix(route.Path, staticPath) {
if strings.HasPrefix(route.Path, staticPath) && route.Method == ctx.Method() {
paramParts := parts[1:]
for _, paramValue := range paramParts {
for _, p := range route.Tmpl().Params {