mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-04-22 23:27:15 +08:00
chore: don't need to close connection if content length is positive numbers for http proxy
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user