mirror of
https://github.com/kennethreitz/flask-sockets.git
synced 2026-06-05 15:00:17 +00:00
little bugfix to avoid exception on non-existing cookie
This commit is contained in:
+3
-1
@@ -39,7 +39,9 @@ class SocketMiddleware(object):
|
||||
try:
|
||||
handler, values = adapter.match()
|
||||
environment = environ['wsgi.websocket']
|
||||
cookie = parse_cookie(environ['HTTP_COOKIE'])
|
||||
cookie = None
|
||||
if 'HTTP_COOKIE' in environ:
|
||||
cookie = parse_cookie(environ['HTTP_COOKIE'])
|
||||
|
||||
with self.app.app_context():
|
||||
with self.app.request_context(environ):
|
||||
|
||||
Reference in New Issue
Block a user