diff --git a/src/socketify/asgi.py b/src/socketify/asgi.py index 750b11f..3ed9449 100644 --- a/src/socketify/asgi.py +++ b/src/socketify/asgi.py @@ -618,7 +618,6 @@ class _ASGI: def run(self): if not self.lifespan: - print("No lifespan!") self.server.run() return self @@ -742,6 +741,7 @@ class ASGI: self.websocket, self.websocket_options, self.task_factory_max_items, + self.lifespan ) if self.listen_options: (port_or_options, handler) = self.listen_options diff --git a/src/socketify/wsgi.py b/src/socketify/wsgi.py index 1bcb105..9732305 100644 --- a/src/socketify/wsgi.py +++ b/src/socketify/wsgi.py @@ -152,7 +152,7 @@ def wsgi(ssl, response, info, user_data, aborted): environ[f"HTTP_{name.replace('-', '_').upper()}"] = value next_header = ffi.cast("socketify_header*", next_header.next) - environ["CONTENT_TYPE"] = environ.get("HTTP_CONTENT_TYPE", None) + environ["CONTENT_TYPE"] = environ.get("HTTP_CONTENT_TYPE", "") def start_response(status, headers): if isinstance(status, str):