Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

Commit d27c4ba

Browse filesBrowse files
author
Robert Aistleitner
committed
little bugfix to avoid exception on non-existing cookie
1 parent acad9bc commit d27c4ba
Copy full SHA for d27c4ba

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎flask_sockets.py

Copy file name to clipboardExpand all lines: flask_sockets.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def __call__(self, environ, start_response):
3939
try:
4040
handler, values = adapter.match()
4141
environment = environ['wsgi.websocket']
42-
cookie = parse_cookie(environ['HTTP_COOKIE'])
42+
cookie = None
43+
if 'HTTP_COOKIE' in environ:
44+
cookie = parse_cookie(environ['HTTP_COOKIE'])
4345

4446
with self.app.app_context():
4547
with self.app.request_context(environ):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.