What’s new in Tornado 4.5¶
Apr 16, 2017¶
tornado.websocketmodule now imposes a limit on the size of incoming messages, which defaults to 10MiB.
Reduced the number of circular references, reducing memory usage and improving performance.
tornado.authmodule has been updated for compatibility with a change to Facebook’s access_token endpoint. This includes both the changes initially released in Tornado 4.4.3 and an additional change to support the
`session_expiresfield in the new format. The
session_expiresfield is currently a string; it should be accessed as
int(user['session_expires'])because it will change from a string to an int in Tornado 5.0.
Suppressed some “‘NoneType’ object not callback” messages that could be logged at shutdown.
Fixed an issue in which a generator object could be garbage collected prematurely (most often when weak references are used.
Transfer-Encodingheader is now parsed case-insensitively.
SimpleAsyncHTTPClientnow follows 308 redirects.
CurlAsyncHTTPClientwill no longer accept protocols other than
https. To override this, set
CurlAsyncHTTPClientnow supports digest authentication for proxies (in addition to basic auth) via the new
The minimum supported version of
HTTPServernow accepts the keyword argument
trusted_downstreamwhich controls the parsing of
X-Forwarded-Forheaders. This header may be a list or set of IP addresses of trusted proxies which will be skipped in the
no_keep_aliveargument works again.
Fixed 100% CPU usage after a callback returns an empty list or dict.
IOLoop.add_callbacknow uses a lockless implementation which makes it safe for use from
__del__methods. This improves performance of calls to
IOLoopthread, and slightly decreases it for calls from other threads.
Worked around an issue that caused “LookupError: unknown encoding: latin1” errors on Solaris.
TCPClientnow supports a
Improved error handling for environments where IPv6 support is incomplete.
RequestHandler.render_embed_csscan be overridden to customize the output of
WebSocketHandler.on_messageimplementations may now be coroutines. New messages will not be processed until the previous
on_messagecoroutine has finished.
websocket_ping_timeoutapplication settings can now be used to enable a periodic ping of the websocket connection, allowing dropped connections to be detected and closed.
websocket_max_message_sizesetting defaults to 10MiB. The connection will be closed if messages larger than this are received.
Return values from
WebSocketHandler.get_compression_optionsmay now include the keys
mem_levelto set gzip parameters. The default compression level is now 6 instead of 9.
The following people contributed commits to this release:
A. Jesse Jiryu Davis
Michael V. DePalatis