mirror of
https://gitee.com/johng/gf
synced 2026-07-07 06:15:15 +08:00
improve status handling for response of ghttp.Server
This commit is contained in:
@ -47,7 +47,7 @@ func (r *Response) Write(content ...interface{}) {
|
||||
if len(content) == 0 {
|
||||
return
|
||||
}
|
||||
if r.Status == 0 {
|
||||
if r.Status == 0 && r.request.hasServeHandler {
|
||||
r.Status = http.StatusOK
|
||||
}
|
||||
for _, v := range content {
|
||||
|
||||
Reference in New Issue
Block a user