fix: set status not work
This commit is contained in:
1 parent
479c4eef57
commit
16541e377c
2 files changed
+3
-3
No files matched your search
@@ -255,8 +255,8 @@ func (c *Ctx) Status(code int) *Ctx {
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
|
||||
c.StatusCode = code
|
||||
c.writermem.status = code
|
||||
c.writermem.WriteHeader(code)
|
||||
c.StatusCode = c.writermem.status
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ func (w *responseWriter) Size() int {
|
||||
}
|
||||
|
||||
func (w *responseWriter) Written() bool {
|
||||
return w.size != noWritten || w.status != 0
|
||||
return w.size != noWritten
|
||||
}
|
||||
|
||||
// Hijack implements the http.Hijacker interface.
|
||||
|
||||
Reference in new issue
Block a user