mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-01-04 22:55:48 +08:00
修复GET302和POST307关闭连接后无法响应的问题
This commit is contained in:
@@ -69,14 +69,14 @@ 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 {
|
||||
flusher, ok := writer.(http.Flusher)
|
||||
if ok {
|
||||
flusher.Flush()
|
||||
}
|
||||
|
||||
request.WAFClose()
|
||||
flusher, ok := writer.(http.Flusher)
|
||||
if ok {
|
||||
flusher.Flush()
|
||||
}
|
||||
|
||||
// 延迟等待响应发送完毕
|
||||
time.Sleep(1 * time.Second)
|
||||
request.WAFClose()
|
||||
|
||||
return false, false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user