[SOLVED] JavaScript chat.html gives handshake exception

Options
Velojet
edited June 2012 in Photon Server
I've just installed v3 and the JavaScript beta SDK (following the install.txt instructions).
I start the server application (Win 7 32-bit) and fire up Chrome to load chat.html:
http://localhost:9090/chat.html

Chrome says:
Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.

The Photon log says:
...
7440: 16:24:48.966 - Service is running...
5724: 16:25:14.952 - CTCPWebSocketServer::ReadCompleted - Exception - CRequestHeaders::ValidateBasicRequestHeaders() - Handshake headers do not include header: "upgrade" with value: "WebSocket".
"accept" - "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" - 61 63 63 65 70 74 00 - accept. -
"accept-charset" - "ISO-8859-1,utf-8;q=0.7,*;q=0.3" - 61 63 63 65 70 74 2D 63 68 61 72 73 65 74 00 - accept-charset. -
"accept-encoding" - "gzip,deflate,sdch" - 61 63 63 65 70 74 2D 65 6E 63 6F 64 69 6E 67 00 - accept-encoding. -
"accept-language" - "en-US,en;q=0.8" - 61 63 63 65 70 74 2D 6C 61 6E 67 75 61 67 65 00 - accept-language. -
"connection" - "keep-alive" - 63 6F 6E 6E 65 63 74 69 6F 6E 00 - connection. -
"cookie" - "__utma=1.2001462579.1335389580.1335389580.1335389580.1; __utmz=1.1335389580.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); deviceorder=01234567; device=0" - 63 6F 6F 6B 69 65 00 - cookie. -
"host" - "localhost:9090" - 68 6F 73 74 00 - host. -
"user-agent" - "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5" - 75 73 65 72 2D 61 67 65 6E 74 00 - user-agent. -
... [8 more lines]

'Handshake headers do not include header: "upgrade" with value: "WebSocket".'

What do I need to do?

Thanks!

Comments

  • [Deleted User]
    Options
    http://localhost/chat.html should work for you.

    ... just curious ... which text in the instructions made you open the chat page on port 9090?
  • Velojet
    Options
    [EDITED]
    My bad - sorry, Stefan.

    My error was in thinking of Photon as a HTTP server (coming to it from NodeJS, Nowjitsu ...).

    So once I accessed chat.html from within my WAMP HTTP server on localhost, the JavaScript chat app was up and running. Nice!

    Thanks for your reply, which was enough to get me thinking more clearly about Photon.