centrifugal / centrifuge-swift

Swift client SDK for bidirectional real-time communication with Centrifugo and Centrifuge-based server over WebSocket
MIT License
47 stars 41 forks source link

Invalid HTTP upgrade when try to connect #37

Closed aytoku closed 3 years ago

aytoku commented 3 years ago

When I try to connect, I am always thrown into onDisconnect. I looked into the connect() and there I came across an error 308 and message "Invalid HTTP upgrade". Do u have any solutions ?

antonselyanin commented 3 years ago

AFAIK, a websocket connection is established via http UPGRADE command. Check if your webserver allows WS connections.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism