Skip to content

wrong status code of middleware #21

@cgyy

Description

@cgyy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions