Skip to content

Commit

Permalink
Look for "Upgrade" in Connection instead of matching exactly.
Browse files Browse the repository at this point in the history
The Connection header can contain other stuff, for instance Firefox 6
puts "keep-alive" there.
  • Loading branch information
wulczer committed Aug 17, 2011
1 parent e26bb98 commit c7aed1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def process(self):
connection = self.requestHeaders.getRawHeaders("Connection", [None])[0]
upgrade = self.requestHeaders.getRawHeaders("Upgrade", [None])[0]

if connection != "Upgrade":
if not connection or "Upgrade" not in connection:
return Request.process(self)

if upgrade not in ("WebSocket", "websocket"):
Expand Down

0 comments on commit c7aed1a

Please sign in to comment.