chore: don't need to close connection if content length is positive numbers for http proxy

This commit is contained in:
wwqgtxx
2026-04-07 18:13:26 +08:00
parent 9f38a26683
commit e5f05aa7a9
+4 -1
View File
@@ -129,7 +129,10 @@ func HandleConn(c net.Conn, tunnel C.Tunnel, store auth.AuthStore, additions ...
}
if !keepAlive {
resp.Close = true
resp.Close = true // close connection if keep-alive is not set
}
if keepAlive && resp.ContentLength > 0 {
resp.Close = false // don't need to close connection if content length is positive numbers
}
if !resp.Close {