]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
websocket: set follow_redirects to False 2920/head
authorDebby <debby@glance.net>
Wed, 10 Jun 2020 17:58:08 +0000 (13:58 -0400)
committerPierce Lopez <pierce.lopez@gmail.com>
Fri, 25 Sep 2020 18:03:19 +0000 (14:03 -0400)
to prevent silent failure when the websocket client gets a 3xx
redirect response, because it does not currently support redirects

Partial fix for issue #2405

tornado/websocket.py

index ff0c241614bfaddd8062d7617a70c5ee062f21ad..eef49e7c994f6103ead109a40ff61352ef812839 100644 (file)
@@ -1409,6 +1409,9 @@ class WebSocketClientConnection(simple_httpclient._HTTPConnection):
                 "Sec-WebSocket-Extensions"
             ] = "permessage-deflate; client_max_window_bits"
 
+        # Websocket connection is currently unable to follow redirects
+        request.follow_redirects = False
+
         self.tcp_client = TCPClient()
         super().__init__(
             None,