Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:gimite/web-socket-ruby

  • Loading branch information...
commit c13ae4911f18f9bbae5d81a9bc35edd4a1e98426 2 parents 825117f + 7f6528e
@gimite authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/web_socket.rb
View
4 lib/web_socket.rb
@@ -324,8 +324,8 @@ def send_frame(opcode, payload, mask)
buffer.write([payload.bytesize / (2 ** 32), payload.bytesize % (2 ** 32)].pack("NN"))
end
if mask
- mask_key = Array.new(4){ rand(256) }.pack("C")
- buffer.write(mask_key)
+ mask_key = Array.new(4){ rand(256) }
+ buffer.write(mask_key.pack("C*"))
payload = apply_mask(payload, mask_key)
end
buffer.write(payload)
Please sign in to comment.
Something went wrong with that request. Please try again.