在tornado中使用websocket实现长轮询,打开页面控制台发现出现了“Failed to load resource: the server responded with a status of 400 (Bad Request)”,打开出现了Can "Upgrade" only to "WebSocket",请问高手是怎么回事?
那是因为你直接用http协议访问的。
websocket客户端要用要用ws://
在tornado中使用websocket实现长轮询,打开页面控制台发现出现了“Failed to load resource: the server responded with a status of 400 (Bad Request)”,打开出现了Can "Upgrade" only to "WebSocket",请问高手是怎么回事?
那是因为你直接用http协议访问的。
websocket客户端要用要用ws://