django-websocket icon indicating copy to clipboard operation
django-websocket copied to clipboard

Supported versions

Open remram44 opened this issue 13 years ago • 4 comments

I could not get this to run on Django 1.4.1 (runserver --multithreaded even crashes) or on Django 1.3.1. The require_websocket views return an error-code 400.

What setup is supposed to work?

remram44 avatar Sep 26 '12 07:09 remram44

Apparently there have been some changes in the protocol... my browser (Google Chrome) doesn't work. In particular, I had to do lowercase comparison for 'websocket' in META['HTTP_UPGRADE'].

It seems that you are using META['wsgi.input']._sock.dup() which is not portable.

remram44 avatar Sep 26 '12 20:09 remram44

My version of Firefox (15.0) sends Connection: keep-alive, Upgrade which is also unexpected by websocket.py.

remram44 avatar Sep 26 '12 21:09 remram44

Chrome reports Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing

remram44 avatar Sep 26 '12 21:09 remram44

Yeah. I like your idea from the other pull request, to use ws4py as WS implementation. The project will definitely will go down this road.

The runserver --multithreaded is broken, you're right. But Django 1.4 already uses multithreading in the development server by default. So I think we can safely remove the django-websockets runserver command.

gregmuellegger avatar Sep 27 '12 22:09 gregmuellegger