fix sniffing for websocket
This commit is contained in:
@@ -506,7 +506,7 @@ func (h *Sniffer) httpRoundTrip(ctx context.Context, rw, cc io.ReadWriteCloser,
|
|||||||
res.Write(rw)
|
res.Write(rw)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if resp.StatusCode >= http.StatusContinue && resp.StatusCode < http.StatusOK {
|
if resp.StatusCode == http.StatusContinue {
|
||||||
resp.Write(rw)
|
resp.Write(rw)
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ func (h *Sniffer) httpRoundTrip(ctx context.Context, rw, cc io.ReadWriteCloser,
|
|||||||
err = fmt.Errorf("read response: %v", err)
|
err = fmt.Errorf("read response: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if resp.StatusCode >= http.StatusContinue && resp.StatusCode < http.StatusOK {
|
if resp.StatusCode == http.StatusContinue {
|
||||||
resp.Write(rw)
|
resp.Write(rw)
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user