mirror of https://github.com/v2ray/v2ray-core
Early detection of non http traffic to match web server behavior
parent
087a62ef3d
commit
221a13e658
|
@ -89,6 +89,10 @@ func (h *HeaderReader) Read(reader io.Reader) (*buf.Buffer, error) {
|
|||
leftover := buffer.BytesFrom(-lenEnding)
|
||||
buffer.Clear()
|
||||
copy(buffer.Extend(lenEnding), leftover)
|
||||
|
||||
if _, err := readRequest(bufio.NewReader(bytes.NewReader(headerBuf.Bytes())), false); err != io.ErrUnexpectedEOF {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue