When I try to connect to a custom socket server using SocketRocket, I get an error message:
Error Domain=SRWebSocketErrorDomain Code=2133 "Invalid Sec-WebSocket-Accept response" UserInfo=0x8f6af00 {NSLocalizedDescription=Invalid Sec-WebSocket-Accept response}
I associated this with the _checkHandshake method in _HTTPHeadersDidFinish. The _checkHandshake method does the following:
NSString *acceptHeader = CFBridgingRelease(CFHTTPMessageCopyHeaderFieldValue(httpMessage, CFSTR("Sec-WebSocket-Accept")));
I found this question and have the latest socketrocket, but it doesn't seem to work?
https://github.com/square/SocketRocket/issues/24
Please let me know how to get around this error (SocketRocket - Invalid Sec-WebSocket-Accept)
source
share