Open ChillingVan opened 8 years ago
Just now I read the Readme.md and learned that I should use gunicorn to deploy. Let me try again. I am sorry that I missed the important information in Readme...
I tried to use gunicorn but got same error... I search on Google and only get answer that gevent does not support python3 well. Is that true?
That does seems to be the issue. I could run it using Python2 but not Python3
Hello. in geventwebsocket/handler.py
headers = [ ("Upgrade", "websocket"), ("Connection", "Upgrade"), ("Sec-WebSocket-Accept", base64.b64encode( hashlib.sha1(key + self.GUID).digest())), ]
Is it OK that key and self.GUID do not use encode('utf-8') method? I met an exception: File "~/geventwebsocket/handler.py", line 219, in upgrade_connection hashlib.sha1(key + self.GUID).digest())), TypeError: Unicode-objects must be encoded before hashing
my dev environment: Python3.5 gevent 1.1.2 gevent-websocket 0.95
I tried to encode the key and self.GUID, but I met other errors then : UnicodeError("The value must be a native string", header, value) this occurs at pywsgi.py at function start_response() because the value of sec websocket key is a byte object.
Of course I change it to a str, then I met other error.....
Thanks for checking this issue.