fix websockets supports.

Thanks Nikolay Kim for the tests and patch.
This commit is contained in:
benoitc 2012-03-26 18:20:30 +02:00
parent ff1dfa1780
commit 573ad019d1

View File

@ -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