# File lib/skinny.rb, line 191
    def handshake
      "HTTP/1.1 101 Switching Protocols\r\n" <<
      "Connection: Upgrade\r\n" <<
      "Upgrade: WebSocket\r\n" <<
      if hixie_75?
        "WebSocket-Location: #{location}\r\n" <<
        "WebSocket-Origin: #{origin}\r\n"
      elsif hixie_76?
        "Sec-WebSocket-Location: #{location}\r\n" <<
        "Sec-WebSocket-Origin: #{origin}\r\n"
      else
        "Sec-WebSocket-Accept: #{challenge_response}\r\n"
      end <<
      (protocol ? "Sec-WebSocket-Protocol: #{protocol}\r\n" : "") <<
      "\r\n" <<
      (if hixie_76? then challenge_response else "" end)
    end