Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ono-max committed Oct 24, 2022
1 parent 78e972b commit 8934756
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/support/protocol_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,9 @@ def initialize s
@sock = s
end

def handshake port, uuid
def handshake port, path
key = SecureRandom.hex(11)
@sock.print "GET /#{uuid} HTTP/1.1\r\nHost: 127.0.0.1:#{port}\r\nConnection: Upgrade\r\nUpgrade: websocket\r\nSec-WebSocket-Version: 13\r\nSec-WebSocket-Key: #{key}==\r\n\r\n"
@sock.print "GET #{path} HTTP/1.1\r\nHost: 127.0.0.1:#{port}\r\nConnection: Upgrade\r\nUpgrade: websocket\r\nSec-WebSocket-Version: 13\r\nSec-WebSocket-Key: #{key}==\r\n\r\n"
server_key = get_server_key

correct_key = Base64.strict_encode64 Digest::SHA1.digest "#{key}==258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
Expand Down

0 comments on commit 8934756

Please sign in to comment.