mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
put back websocket support with new http parser
This commit is contained in:
parent
1ae47ef82f
commit
ae025cd22b
@ -27,7 +27,7 @@ class WebSocketWSGI(object):
|
|||||||
start_response('400 Bad Request', [('Connection','close')])
|
start_response('400 Bad Request', [('Connection','close')])
|
||||||
return []
|
return []
|
||||||
|
|
||||||
sock = environ['wsgi.input'].get_socket()
|
sock = environ['gunicorn.socket']
|
||||||
ws = WebSocket(sock,
|
ws = WebSocket(sock,
|
||||||
environ.get('HTTP_ORIGIN'),
|
environ.get('HTTP_ORIGIN'),
|
||||||
environ.get('HTTP_WEBSOCKET_PROTOCOL'),
|
environ.get('HTTP_WEBSOCKET_PROTOCOL'),
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class WebSocketWSGI(object):
|
|||||||
start_response('400 Bad Request', [('Connection','close')])
|
start_response('400 Bad Request', [('Connection','close')])
|
||||||
return []
|
return []
|
||||||
|
|
||||||
sock = environ['wsgi.input'].get_socket()
|
sock = environ['gunicorn.socket']
|
||||||
ws = WebSocket(sock,
|
ws = WebSocket(sock,
|
||||||
environ.get('HTTP_ORIGIN'),
|
environ.get('HTTP_ORIGIN'),
|
||||||
environ.get('HTTP_WEBSOCKET_PROTOCOL'),
|
environ.get('HTTP_WEBSOCKET_PROTOCOL'),
|
||||||
|
|||||||
@ -88,6 +88,7 @@ def create(req, sock, client, server, debug=False):
|
|||||||
"wsgi.multithread": False,
|
"wsgi.multithread": False,
|
||||||
"wsgi.multiprocess": wsgi_multiprocess,
|
"wsgi.multiprocess": wsgi_multiprocess,
|
||||||
"wsgi.run_once": False,
|
"wsgi.run_once": False,
|
||||||
|
"gunicorn.socket": sock,
|
||||||
"SCRIPT_NAME": script_name,
|
"SCRIPT_NAME": script_name,
|
||||||
"SERVER_SOFTWARE": SERVER_VERSION,
|
"SERVER_SOFTWARE": SERVER_VERSION,
|
||||||
"REQUEST_METHOD": req.method,
|
"REQUEST_METHOD": req.method,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user