mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-23 18:22:23 +08:00
change AbortWithStatus,delete c.Writer.WriteHeaderNow()
This commit is contained in:
parent
9e895470dd
commit
6552fa127e
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ vendor/*
|
||||
!vendor/vendor.json
|
||||
coverage.out
|
||||
count.out
|
||||
.idea/
|
||||
|
@ -125,7 +125,7 @@ func (c *Context) Abort() {
|
||||
// For example, a failed attempt to authenticate a request could use: context.AbortWithStatus(401).
|
||||
func (c *Context) AbortWithStatus(code int) {
|
||||
c.Status(code)
|
||||
c.Writer.WriteHeaderNow()
|
||||
//c.Writer.WriteHeaderNow()
|
||||
c.Abort()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user