dpallot / simple-websocket-server

A python based websocket server that is simple and easy to use.
951 stars 321 forks source link

Invalid handshake #74

Closed fsofras closed 5 years ago

fsofras commented 6 years ago

I have installed SimpleWebSocketServer as per the instructions. Using an exact copy of the SimpleWebSocketServer.py and websocket.html I get the following error:

Invalid handshake Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 85, in check_request assert get_header('Upgrade').lower() == 'websocket' AssertionError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 88, in handler extra_headers=self.extra_headers, File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 437, in handshake key = check_request(get_header) File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 93, in check_request raise InvalidHandshake("Invalid request") from exc websockets.exceptions.InvalidHandshake: Invalid request Invalid handshake Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 85, in check_request assert get_header('Upgrade').lower() == 'websocket' AssertionError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 88, in handler extra_headers=self.extra_headers, File "/usr/local/lib/python3.5/dist-packages/websockets/server.py", line 437, in handshake key = check_request(get_header) File "/usr/local/lib/python3.5/dist-packages/websockets/handshake.py", line 93, in check_request raise InvalidHandshake("Invalid request") from exc websockets.exceptions.InvalidHandshake: Invalid request

What am I doing wrong? Your help will be greatly appreciated

dpallot commented 5 years ago

I can not reproduce, close for now.