add compression flag option for http request

This commit is contained in:
ginuerzh
2024-11-02 20:41:23 +08:00
parent edb9a992e2
commit a12870e766
6 changed files with 23 additions and 11 deletions
+5 -1
View File
@@ -530,7 +530,11 @@ func (h *Sniffer) httpRoundTrip(ctx context.Context, rw, cc io.ReadWriter, node
return
}
return resp.Close, nil
if resp.ContentLength >= 0 {
close = resp.Close
}
return
}
func upgradeType(h http.Header) string {