fix sniffing for websocket

This commit is contained in:
ginuerzh
2025-09-04 21:30:49 +08:00
parent c7d16962ec
commit e2072399dd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -506,7 +506,7 @@ func (h *Sniffer) httpRoundTrip(ctx context.Context, rw, cc io.ReadWriteCloser,
res.Write(rw)
return
}
if resp.StatusCode >= http.StatusContinue && resp.StatusCode < http.StatusOK {
if resp.StatusCode == http.StatusContinue {
resp.Write(rw)
resp.Body.Close()
continue
+1 -1
View File
@@ -360,7 +360,7 @@ func (h *Sniffer) httpRoundTrip(ctx context.Context, rw, cc io.ReadWriteCloser,
err = fmt.Errorf("read response: %v", err)
return
}
if resp.StatusCode >= http.StatusContinue && resp.StatusCode < http.StatusOK {
if resp.StatusCode == http.StatusContinue {
resp.Write(rw)
resp.Body.Close()
continue