We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug If you use the ctx.NextOrNotFound() function in middlewares you will run it in loop...
ctx.NextOrNotFound()
To Reproduce
package main import ( "fmt" "log" "github.com/kataras/iris/v12" ) func main() { app := iris.New() app.Logger().SetLevel("debug") app.Get("/", getMiddleware1, getMiddleware2, getIndex) // Read the README.md before any action. err := app.Run(iris.Addr(":8081")) if err != nil { log.Fatal(err) } } func getIndex(ctx iris.Context) { ctx.Text("Page") } func getMiddleware1(ctx iris.Context) { fmt.Println("Middleware 1") ctx.NextOrNotFound() } func getMiddleware2(ctx iris.Context) { fmt.Println("Middleware 2") ctx.NextOrNotFound() }
Expected behavior The Middelware 2 should only run once... not in loop!
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
fix #1473 and add test for #1468 #1474 #1475
bb7dfdf
a694266
Former-commit-id: 3e7d927761a5d5559b65ea3f91b94e3dc523a187
kataras
No branches or pull requests
Describe the bug
If you use the
ctx.NextOrNotFound()
function in middlewares you will run it in loop...To Reproduce
Expected behavior
The Middelware 2 should only run once... not in loop!
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: