Skip to content

Commit

Permalink
fix read request
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlh committed Feb 11, 2020
1 parent e2d249a commit b43bcb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/conn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b43bcb1

Please sign in to comment.