Merge pull request #587 from roylou/develop

Write header immediately in AbortWithStatus(), close #585
This commit is contained in:
Javier Provecho Fernandez
2016-04-15 00:36:29 +02:00
5 changed files with 6 additions and 10 deletions
+1
View File
@@ -115,6 +115,7 @@ func (c *Context) Abort() {
// For example, a failed attempt to authentificate a request could use: context.AbortWithStatus(401).
func (c *Context) AbortWithStatus(code int) {
c.Status(code)
c.Writer.WriteHeaderNow()
c.Abort()
}