robbiehanson/CocoaHTTPServer — pull request #21 by plelevier (2012-04-25 19:34:23+00:00)
Title: Fix for websocket connection issue with Firefox

As said in https://github.com/robbiehanson/CocoaHTTPServer/issues/20
Firefox is sending the following Connection header field for websockets

Connection:keep-alive, Upgrade

This fix looks for the "Upgrade" keyword (insensitive search) anywhere in the connection value string.
If found it allows the connection, otherwise it is rejected

The behavior seems to be in firefox since version 7 (at least)
see : https://github.com/Lawouach/WebSocket-for-Python/issues/3