Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/websocket/driver/hybi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ def parse_length(octet)
if @require_masking and not @frame.masked
return fail(:unacceptable, 'Received unmasked frame but masking is required')
end

if @masking and @frame.masked
return fail(:protocol_error, 'Received masked frame but masking is forbidden')
end
end

def parse_extended_length(buffer)
Expand Down