修复读超时时间(ReadDeadline)导致WAFGET302、POST307延时关闭连接的问题

This commit is contained in:
刘祥超
2023-01-09 15:56:59 +08:00
parent 006cc2912d
commit 195742bb26
3 changed files with 12 additions and 19 deletions

View File

@@ -70,7 +70,12 @@ func (this *Get302Action) Perform(waf *WAF, group *RuleGroup, set *RuleSet, requ
http.Redirect(writer, request.WAFRaw(), Get302Path+"?info="+url.QueryEscape(info), http.StatusFound)
if request.WAFRaw().ProtoMajor == 1 {
_ = this.CloseConn(writer)
flusher, ok := writer.(http.Flusher)
if ok {
flusher.Flush()
}
request.WAFClose()
}
return false, false