mirror of
https://github.com/faye/websocket-driver-ruby.git
synced 2025-11-01 13:59:38 +00:00
Parse the mask flag and length in the order they appear in the protocol.
This commit is contained in:
@@ -305,8 +305,8 @@ module WebSocket
|
||||
end
|
||||
|
||||
def parse_length(data)
|
||||
@frame.length = (data & LENGTH)
|
||||
@frame.masked = (data & MASK) == MASK
|
||||
@frame.length = (data & LENGTH)
|
||||
|
||||
if @frame.length >= 0 and @frame.length <= 125
|
||||
@stage = @frame.masked ? 3 : 4
|
||||
|
||||
Reference in New Issue
Block a user