fix read request

pull/400/head
cnlh 2020-02-11 14:01:16 +08:00
parent e2d249a576
commit b43bcb1c96
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ func (s *Conn) readRequest(buf []byte) (n int, err error) {
return
}
n += rd
if n < 4 {
continue
}
if string(buf[n-4:n]) == "\r\n\r\n" {
return
}