-
Notifications
You must be signed in to change notification settings - Fork 387
KeyError: 'upgrade' #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have the same issue. I'm currently trying to interconnect a python process (implementing python-websocket-server) and a nodejs server (on the same machine) with socket.io client. This error disappeared by changing the options passed to the socket.io client instanciation like so
it's still do not work because the connection is closed right away.. |
Well, I think I figured out what's causing the errors for me. |
I ran into this same error when I was attempting to use SSL. If I run a server without it, then everything works just fine. As soon as I add an SSL cert into the mix, I first get an error:
Then, when I add a a proxy_pass to try to upgrade the header for the web client, I get the same error you do:
Have not found a way around this. |
Same problem here. :( |
修改库文件代码 |
|
Yes, it seems to occur if the user accidentally sends an http request to the websocket host and port. |
Sometimes getting a weird error. Not sure on what action exactly...
2018-08-24 10:13:03,075 DEBUG webserver client left: None
Exception happened during processing of request from ('122.228.10.51', 26823)
Traceback (most recent call last):
File "/usr/lib64/python3.6/socketserver.py", line 639, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib64/python3.6/socketserver.py", line 361, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/home/ec2-user/libraries/websocket_server.py", line 166, in init
StreamRequestHandler.init(self, socket, addr, server)
File "/usr/lib64/python3.6/socketserver.py", line 696, in init
self.handle()
File "/home/ec2-user/libraries/websocket_server.py", line 177, in handle
self.handshake()
File "/home/ec2-user/libraries/websocket_server.py", line 319, in handshake
assert headers['upgrade'].lower() == 'websocket'
KeyError: 'upgrade'
The text was updated successfully, but these errors were encountered: