kopia lustrzana https://github.com/cirospaciari/socketify.py
fix WSGI CONTENT_TYPE for django, fix ASGI lifespan off
rodzic
846414056e
commit
e2cfd96e7d
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Ładowanie…
Reference in New Issue