mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 11:56:53 +00:00
fix read request
This commit is contained in:
@@ -43,6 +43,9 @@ func (s *Conn) readRequest(buf []byte) (n int, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
n += rd
|
n += rd
|
||||||
|
if n < 4 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if string(buf[n-4:n]) == "\r\n\r\n" {
|
if string(buf[n-4:n]) == "\r\n\r\n" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user