Sha256: 1e83c75fabb3762927e04b6ee1aefb169fb75131020024aeff53eaafc6804aba
Contents?: true
Size: 654 Bytes
Versions: 13
Compression:
Stored size: 654 Bytes
Contents
module EventMachine module WebSocket class Handler75 < Handler def handshake location = "#{@request['Host'].scheme}://#{@request['Host'].host}" location << ":#{@request['Host'].port}" if @request['Host'].port location << @request['Path'] upgrade = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" upgrade << "Upgrade: WebSocket\r\n" upgrade << "Connection: Upgrade\r\n" upgrade << "WebSocket-Origin: #{@request['Origin']}\r\n" upgrade << "WebSocket-Location: #{location}\r\n\r\n" debug [:upgrade_headers, upgrade] return upgrade end end end end
Version data entries
13 entries across 13 versions & 2 rubygems