Code Monkey home page Code Monkey logo

Comments (5)

atrebbi avatar atrebbi commented on August 15, 2024 1

I had the same error
I have proxied the websocket through apache, that manages ssl , with the following in VirtualHost (the websocket server runs on port 13100)

<VirtualHost :443>
...
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule .
ws://yourserver.com:13100%{REQUEST_URI} [P]
...

and my client simply connects to
wss://yourserver.com

from python-websocket-server.

Laura055 avatar Laura055 commented on August 15, 2024

Yea I have the same problem

from python-websocket-server.

adeora avatar adeora commented on August 15, 2024

+1, also running into this

from python-websocket-server.

Jawmo avatar Jawmo commented on August 15, 2024

This appears due to trying to utilize an SSL on the server. I received the same message. Have you guys found a way around this? Are you also utilizing nginx in your projects?

When attempting a proxy_pass, I then receive a new error:

Traceback (most recent call last):
  File "/usr/lib/python3.6/socketserver.py", line 721, in __init__
    self.handle()
  File "/home/damian/hopemud/websocket_server/websocket_server.py", line 199, in handle
    self.handshake()
  File "/home/damian/hopemud/websocket_server/websocket_server.py", line 337, in handshake
    assert headers['upgrade'].lower() == 'websocket'
KeyError: 'upgrade'

from python-websocket-server.

Alveona avatar Alveona commented on August 15, 2024

I accidentally tried to connect through 'wss' to my local server, which hadn't any certificates and that was causing this error.
Changing to 'ws' protocol resolved this

from python-websocket-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.