Check for websocket request before checking for HTTP/1.1
Requests that come into WebSocketHandler that are not websocket requests should not error out if they are not HTTP/1.1 since they can simply be handled by super(WebSocketHandler, self).run_application(). The simplest fix seems to be checking HTTP_UPGRADE before HTTP/1.1.
I am using the GeventWebSocketWorker for a general WSGI app, so only some routes are actually websockets. Perhaps that isn't the intention of this library though.