Issue #36 invalid

"Unknown request method" shouldn't be returned for non-GET requests

tomst
created an issue

WebSocketHandler().upgrade_websocket shouldn't send a 400 response when the request method isn't GET. It should defer it to the underlying application object.

Possible fix would be to just return here:

        if self.environ.get('REQUEST_METHOD', '') != 'GET':
            return

Comments (4)

  1. Jeffrey Gelens repo owner

    Falling back to the underlying app is not according to Websocket specs (4.2.1). If a normal HTTP requests connects to a WS endpoint, it shouldn't be accepted by the server.

  2. Log in to comment