gimite / web-socket-js

HTML5 Web Socket implementation powered by Flash
BSD 3-Clause "New" or "Revised" License
2.73k stars 489 forks source link

Tomcat 7 WebSocketServlet (RFC 6455) issue #124

Closed cope closed 11 years ago

cope commented 11 years ago

With Opera 12.02 and IE 9 the error is:

[WebSocket] bad response: HTTP/1.1 505 HTTP Version Not Supported

Does this mean that the issue is in the WebSocketServlet implementation of Tomcat 7?

gimite commented 11 years ago

Please make sure you use the latest version of web-socket-js. Old web-socket-js speaks old draft protocol. If you still see the issue, follow "Troubleshooting" section on: https://github.com/gimite/web-socket-js

cope commented 11 years ago

I downloaded it a few days ago. As I see that is the latest version...

I also went trough the "Troubleshooting" section but it didn't help. I installed the Socket Policy File Server (http://socketpolicyfile.codeplex.com/), I opened up port 843, still the same error message.

Obviously I am missing something or doing something wrong, but with my 0 experience with flash, I am without ideas.

I will try with the debugger version of Flash Player to see Flash errors now...

cope commented 11 years ago

This looks like a server issue. But I am not completely sure :(

LOG: [WebSocket] debug enabled LOG: [WebSocket] policy file: xmlsocket://localhost:843 LOG: [WebSocket] connected LOG: [WebSocket] request header: GET /WSTest/WSTestWebSocketFacade HTTP/1.1 Host: localhost:8080 Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: ABR7IDtZUnIBH3Y0IgUTCg== Origin: http://localhost:8080 Sec-WebSocket-Version: 13 Cookie: language=croatian

LOG: [WebSocket] response header: HTTP/1.1 505 HTTP Version Not Supported Server: Apache-Coyote/1.1 Date: Tue, 30 Oct 2012 10:03:32 GMT Connection: close

[WebSocket] bad response: HTTP/1.1 505 HTTP Version Not Supported LOG: [WebSocket] closed

cope commented 11 years ago

Figured it out!

The line GET /WSTest/WSTestWebSocketFacade HTTP/1.1 had some params and one of which had a darn space in it. Once I escaped the space character everything started working properly!

This issue can be closed. Thanks!

gimite commented 11 years ago

I see. It should automatically escape or report error. Thanks for the information.