mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-27 19:35:49 +08:00
1
This commit is contained in:
1
server/.gitignore
vendored
1
server/.gitignore
vendored
@@ -36,3 +36,4 @@ main.exe~
|
||||
!hotgo/
|
||||
*.lock
|
||||
/bin/package.sh
|
||||
internal/packed/packed.go
|
||||
|
@@ -3,8 +3,8 @@
|
||||
gfcli:
|
||||
build:
|
||||
name: "hotgo" # 编译后的可执行文件名称
|
||||
# arch: "all" #不填默认当前系统架构,可选:386,amd64,arm,all
|
||||
# system: "all" #不填默认当前系统平台,可选:linux,darwin,windows,all
|
||||
arch: "amd64" # 不填默认当前系统架构,可选:386,amd64,arm,all
|
||||
system: "linux" # 不填默认当前系统平台,可选:linux,darwin,windows,all
|
||||
mod: "none"
|
||||
cgo: 0
|
||||
packSrc: "resource" # 将resource目录打包进可执行文件,静态资源无需单独部署
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user