stats
stats copied to clipboard
wrong status code of middleware
the example of gin should be:
// StatMiddleware response time, status code count, etc.
func StatMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
beginning, _ := Stats.Begin(c.Writer)
c.Next()
Stats.EndWithStatus(beginning, c.Writer.Status())
}
}
the example of martini has same issue