GET302/POST307兼容safari浏览器

This commit is contained in:
刘祥超
2023-03-06 16:27:06 +08:00
parent 72c65ca4ee
commit 77c56e58c0
2 changed files with 1 additions and 8 deletions

View File

@@ -74,9 +74,5 @@ func (this *Get302Action) Perform(waf *WAF, group *RuleGroup, set *RuleSet, requ
flusher.Flush() flusher.Flush()
} }
// 延迟等待响应发送完毕
time.Sleep(1 * time.Second)
request.WAFClose()
return false, false return false, false
} }

View File

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