I want to develop a timeout middleware, but I' found only can do it by fix context.Status()
// Status sets the HTTP response code. func (c *Context) Status(code int) { c.writermem.WriteHeader(code) -> c.Writer.WriteHeader(code) }
[reference] https://github.com/golang/go/blob/003dbc4cda6a1418fc419461799320521d64f4e5/src/net/http/server.go#L3209
Comment From: appleboy
Try timeout middleware: https://github.com/gin-contrib/timeout
Comment From: ciokan
Try timeout middleware: https://github.com/gin-contrib/timeout
That middleware does not work due to a bug that has almost a year by now. (panic: http: wrote more than the declared Content-Length)
Comment From: duaneking
Try timeout middleware: https://github.com/gin-contrib/timeout
That middleware is not functional, and has multiple breaking bugs.
Comment From: vearne
try timeout middleware https://github.com/vearne/gin-timeout
Comment From: v0vanec
That https://github.com/gin-contrib/timeout middleware is totally broken, we also tried and could not use it.