Use Writer in Context.Status (#1606)

This commit is contained in:
willnewrelic 2019-10-16 19:14:44 -07:00 committed by Bo-Yi Wu
parent 1a1cf655bd
commit 0ce4661029
1 changed files with 1 additions and 1 deletions

View File

@ -744,7 +744,7 @@ func bodyAllowedForStatus(status int) bool {
// Status sets the HTTP response code. // Status sets the HTTP response code.
func (c *Context) Status(code int) { func (c *Context) Status(code int) {
c.writermem.WriteHeader(code) c.Writer.WriteHeader(code)
} }
// Header is a intelligent shortcut for c.Writer.Header().Set(key, value). // Header is a intelligent shortcut for c.Writer.Header().Set(key, value).