This commit is contained in:
孟帅
2024-03-08 10:32:07 +08:00
parent 0fbc1ad47c
commit f0bf193077
11 changed files with 12 additions and 14 deletions

View File

@@ -12,7 +12,6 @@ import (
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/util/gmeta"
"hotgo/internal/consts"
"hotgo/internal/library/contexts"
"hotgo/internal/library/response"
"hotgo/utility/charset"
"hotgo/utility/simple"
@@ -34,7 +33,7 @@ func (s *sMiddleware) ResponseHandler(r *ghttp.Request) {
contentType := getContentType(r)
// 已存在响应
if contentType != consts.HTTPContentTypeStream && r.Response.BufferLength() > 0 && contexts.Get(r.Context()).Response != nil {
if contentType != consts.HTTPContentTypeStream && r.Response.BufferLength() > 0 { // && contexts.Get(r.Context()).Response != nil
return
}