mirror of
https://github.com/golang/go
synced 2024-11-22 02:24:41 -07:00
websocket: fix binary frame size decoding
R=ukai, rsc CC=golang-dev https://golang.org/cl/166074
This commit is contained in:
parent
0e2e066caa
commit
4f8a000e17
@ -64,9 +64,8 @@ func (ws *Conn) Read(msg []byte) (n int, err os.Error) {
|
||||
if err != nil {
|
||||
return n, err
|
||||
}
|
||||
if (c & 0x80) == 0x80 {
|
||||
length = length*128 + int(c&0x7f)
|
||||
} else {
|
||||
if (c & 0x80) == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user