From d2f26c682c013ab0006c84eec6da2804e7b8bac8 Mon Sep 17 00:00:00 2001 From: Ciro Spaciari Date: Tue, 29 Oct 2024 12:13:08 -0700 Subject: [PATCH] fix wsgi --- pyproject.toml | 2 +- setup.py | 2 +- src/socketify/wsgi.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 437271d..7ceddc0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "socketify" -version = "0.0.30" +version = "0.0.31" dynamic = ["dependencies"] authors = [ { name="Ciro Spaciari", email="ciro.spaciari@gmail.com" }, diff --git a/setup.py b/setup.py index 924f629..28c6976 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ with open("README.md", "r", encoding="utf-8") as fh: setuptools.setup( name="socketify", - version="0.0.30", + version="0.0.31", platforms=["any"], author="Ciro Spaciari", author_email="ciro.spaciari@gmail.com", diff --git a/src/socketify/wsgi.py b/src/socketify/wsgi.py index a32e053..b1073d3 100644 --- a/src/socketify/wsgi.py +++ b/src/socketify/wsgi.py @@ -548,7 +548,7 @@ class _WSGI: self.server = App(options, task_factory_max_items=0) self.SERVER_HOST = None self.SERVER_PORT = None - self.SERVER_WS_SCHEME = "wss" if self.server.options else "ws" + self.SERVER_WS_SCHEME = "wss" if self.server._options else "ws" self.wsgi = app self.EMPTY_WSGI_BODY = WSGIBody(BytesIO()) self.BASIC_ENVIRON = dict(os.environ) @@ -671,7 +671,7 @@ class _WSGI: "wsgi.errors": sys.stderr, "wsgi.version": (1, 0), "wsgi.run_once": False, - "wsgi.url_scheme": "https" if self.server.options and self.server.options.cert_file_name is not None else "http", + "wsgi.url_scheme": "https" if self.server._options and self.server._options.cert_file_name is not None else "http", "wsgi.multithread": False, "wsgi.multiprocess": False, "wsgi.file_wrapper": None, # No file wrapper support for now