GET302/POST307兼容safari浏览器

This commit is contained in:
GoEdgeLab
2023-03-06 16:27:06 +08:00
parent ec53263a74
commit 08d06c9a1f
2 changed files with 1 additions and 8 deletions

View File

@@ -81,6 +81,7 @@ func (this *Post307Action) Perform(waf *WAF, group *RuleGroup, set *RuleSet, req
var req = request.WAFRaw()
if req.ContentLength > 0 && req.Body != nil {
_, _ = io.Copy(io.Discard, req.Body)
_ = req.Body.Close()
}
// 设置Cookie
@@ -98,9 +99,5 @@ func (this *Post307Action) Perform(waf *WAF, group *RuleGroup, set *RuleSet, req
flusher.Flush()
}
// 延迟等待响应发送完毕
time.Sleep(1 * time.Second)
request.WAFClose()
return false, false
}