Received invalid Sec-WebSocket-Accept response

800 views Asked by At

I'm trying to connect to lichess web socket server with a very typical piece of code:

    let request = NSMutableURLRequest(url: URL(string: "wss://socket.lichess.org/")!)

    self.webSocket = SRWebSocket(urlRequest: request as URLRequest!)
    self.webSocket!.delegate = self
    self.webSocket!.open()

But for unknown reason I receive an Invalid Sec-WebSocket-Accept response:

    2017-02-28 16:01:06.724415 Lichess[58458:3046032] Optional(<CFHTTPMessageRef 0x100f08140(0x100f08150)> { parsed response, url = (null), status = 200 })
    2017-02-28 16:01:06.724563 Lichess[58458:3046032] Did fail with error: Invalid Sec-WebSocket-Accept response

I was trying to figure out what is going wrong for a past few hours, but still have no solution. Who is familiar with this Sec-WebSocket-Accept and where could be an error hidden?

0

There are 0 answers