'Sets up the ``pywsgi.Handler`` to work with a websocket response.
This is used by other projects that need to support WebSocket
connections as part of a larger effort.'

def _prepare_response(self):

    assert (not self.headers_sent)
    if (not self.environ.get('wsgi.websocket')):
        return
    self.provided_content_length = False
    self.response_use_chunked = False
    self.close_connection = True
    self.provided_date = True
