mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-24 02:32:17 +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
|
!vendor/vendor.json
|
||||||
coverage.out
|
coverage.out
|
||||||
count.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).
|
// For example, a failed attempt to authenticate a request could use: context.AbortWithStatus(401).
|
||||||
func (c *Context) AbortWithStatus(code int) {
|
func (c *Context) AbortWithStatus(code int) {
|
||||||
c.Status(code)
|
c.Status(code)
|
||||||
c.Writer.WriteHeaderNow()
|
//c.Writer.WriteHeaderNow()
|
||||||
c.Abort()
|
c.Abort()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user