You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When you add multiple middlewares using app.UseGlobal and you have multiple routes that have the same path and the same parameters, but each route's parameter uses a different func for matching, the first middleware won't get called on routes starting from the second one. For example: https://github.com/pipe01/iris-bug/blob/master/main.go
---
Called first middleware
Called second middleware
first route
---
Called first middleware
Called second middleware
second route
---
Called first middleware
Called second middleware
third route
---
Instead, it outputs:
---
Called first middleware
Called second middleware
first route
---
Called second middleware
second route
---
Called second middleware
third route
---
Desktop (please complete the following information):
OS: Ubuntu 19.10
Go 1.13.1
The text was updated successfully, but these errors were encountered:
Thanks a lot @pipe01! That is fixed and a test-case added, however you could just use app.Use there, UseGlobal is required if called right before Listen/Run function.
Describe the bug
When you add multiple middlewares using
app.UseGlobal
and you have multiple routes that have the same path and the same parameters, but each route's parameter uses a different func for matching, the first middleware won't get called on routes starting from the second one. For example: https://github.com/pipe01/iris-bug/blob/master/main.goTo Reproduce
Steps to reproduce the behavior:
git clone https://github.com/pipe01/iris-bug
go run .
./call.sh
Expected behavior
The script should output
Instead, it outputs:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: