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
Timeout middleware always log superfluous response.WriteHeader for a not existed route(404.
access a not existed url like http://localhost:8080/bla
package main import ( "log" "net/http" "time" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" ) func main() { e := echo.New() // add middleware and routes // ... e.Use(middleware.TimeoutWithConfig(middleware.TimeoutConfig{ ErrorMessage: "request timeout, please retry later.", Timeout: 30 * time.Second, })) e.GET("/ping", func(c echo.Context) error { return c.String(200, "pong") }) if err := e.Start(":8080"); err != http.ErrServerClosed { log.Fatal(err) } }
github.com/labstack/echo/v4 v4.3.0
The text was updated successfully, but these errors were encountered:
This bug is a little tricky, if we use the http.TimeoutHandler implementation, we probably lost some precise control.
http.TimeoutHandler
Sorry, something went wrong.
7f502b1
No branches or pull requests
Issue Description
Timeout middleware always log superfluous response.WriteHeader for a not existed route(404.
Steps to reproduce
access a not existed url like http://localhost:8080/bla
Working code to debug
Version/commit
github.com/labstack/echo/v4 v4.3.0
The text was updated successfully, but these errors were encountered: