These are chat archives for cherrypy/cherrypy

Aug 2016
Aug 09 2016 14:42
Hi guys, Has anyone ever tried using websockets with the RoutesDispatcher?
My config looks like this:
conf = {'/': {'request.dispatch': routes}, '/css':{"tools.staticdir.dir":baseviews+'/css', "tools.staticdir.on":True}, '/js':{"tools.staticdir.dir":baseviews+'/js', "tools.staticdir.on":True}, '/fonts':{"tools.staticdir.dir":baseviews+'/fonts', "tools.staticdir.on":True}, '/images':{"tools.staticdir.dir":baseviews+'/images', "tools.staticdir.on":True}, '/ws': {'tools.websocket.on': True, 'tools.websocket.handler_cls': WSWebSocketHandler } }
where routes is the RoutesDispatcher instance with all the routes(/ws not configured there)
and when i try something along the lines of w = new WebSocket("ws://localhost:8080/ws")
I get Error during WebSocket handshake: Unexpected response code: 404
any ideas?