TakahikoKawasaki / nv-websocket-client

High-quality WebSocket client implementation in Java.
Apache License 2.0
2.03k stars 292 forks source link

can't connect #164

Closed YanXiaosa5 closed 5 years ago

YanXiaosa5 commented 6 years ago

question: "The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 302 " I don't konw the reason ,please help me ,thank you

TakahikoKawasaki commented 6 years ago

A WebSocket client expects that the HTTP status code of the response from a WebSocket server is 101, but your WebSocket server returned 302.

In general, when a web browser receives 302, the web browser goes to the location which is written in the Location header in the response from the web server.

The WebSocket URL your WebSocket client application accessed returned 302. It means that the WebSocket URL urged your WebSocket client application to access another different URL. Check the value of the Location header included in the response from the WebSocket server.

In any case, I'm sorry nv-websocket-client does not support redirection (302).

TakahikoKawasaki commented 5 years ago

Sorry, no plan to support redirection.