.. warning::
The WebSocket protocol is still in development. This module currently
- implements the "draft76" version of the protocol, which is supported
- only by Chrome and Safari. See this `browser compatibility table
+ implements the "hixie-76" and "hybi-10" versions of the protocol.
+ See this `browser compatibility table
<http://en.wikipedia.org/wiki/WebSockets#Browser_support>`_ on Wikipedia.
"""
# Author: Jacob Kristhammar, 2010
Override on_message to handle incoming messages. You can also override
open and on_close to handle opened and closed connections.
- See http://www.w3.org/TR/2009/WD-websockets-20091222/ for details on the
+ See http://dev.w3.org/html5/websockets/ for details on the
JavaScript interface. This implement the protocol as specified at
+ http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10
+ The older protocol version specified at
http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76.
+ is also supported.
Here is an example Web Socket handler that echos back all received messages
back to the client::
small synchronous requests.
* `~tornado.httpserver.HTTPServer` can now be run on a unix socket as well
as TCP.
-
+* `~tornado.web.StaticFileHandler` subclasses can now override
+ ``get_cache_time`` to customize cache control behavior.
+* `tornado.websocket` now supports the latest ("hybi-10") version of the
+ protocol (the old version, "hixie-76" is still supported; the correct
+ version is detected automatically).
+* New module `tornado.platform.twisted` contains a bridge between the
+ Tornado IOLoop and the Twisted Reactor, allowing code written for Twisted
+ to be run on Tornado.
+* `RequestHandler.flush` can now take a callback for flow control.
+* `SimpleAsyncHTTPClient` now takes a maximum buffer size, to allow reading
+ files larger than 100MB
+* `IOLoop.install` can now be used to use a custom subclass of IOLoop
+ as the singleton without monkey-patching.
+* `RequestHandler.add_header` can now be used to set a header that can
+ appear multiple times in the response.
+* `IOLoop.add_timeout` now accepts `datetime.timedelta` objects in addition
+ to absolute timestamps.
Bug fixes
~~~~~~~~~
* Cookie values containing special characters are now properly quoted
and unquoted.
* Multi-line headers are now supported.
+* The `IOStream` close callback will no longer be called while there
+ are pending read callbacks that can be satisfied with buffered data.
+* Fixed file descriptor leaks and multiple callback invocations in
+ `SimpleAsyncHTTPClient`
+* Repeated Content-Length headers (which may be added by certain proxies)
+ are now supported in `HTTPServer`.
+* Unicode string literals now work in template expressions.
+* `~tornado.ioloop.PeriodicCallback` now sticks to the specified period
+ instead of creeping later due to accumulated errors.
+* The template ``{% module %}`` directive now works even if applications
+ use a template variable named ``modules``.