diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index dfdfe107..a485a420 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -195,6 +195,9 @@ class Response(object): # handle websocket if value.lower().strip() == "upgrade": self.upgrade = True + elif lname == "upgrade": + if value.lower().strip() == "websocket": + self.headers.append((name.strip(), str(value).strip())) # ignore hopbyhop headers continue