Tornado 4.4的新功能¶
2016年7月15日¶
一般¶
tornado.curl_httpclient
¶
故障在
_curl_setup_request
不再是因为max_clients
游泳池要耗尽。现在正确处理非ASCII头值。
tornado.gen
¶
with_timeout
现在接受任何可移动的对象(除了YieldPoint
),不仅仅是tornado.concurrent.Future
.
tornado.httpclient
¶
超时引发的错误现在表示请求处于何种状态;错误消息不再只是“599超时”。
调用
repr
在一tornado.httpclient.HTTPError
不再引发错误。
tornado.httpserver
¶
类整数枚举(包括
http.HTTPStatus
)现在可以用作状态代码。状态代码为的响应
204 No Content
不再发射Content-Length: 0
标题。
tornado.ioloop
¶
在有大量活动超时时提高性能。
tornado.netutil
¶
tornado.options
¶
除了属性语法之外,现在还可以用下标语法修改选项。
特殊变量
__file__
现在在配置文件中可用。
tornado.simple_httpclient
¶
HTTP/1.0(不是1.1)响应没有
Content-Length
收割台现在工作正常。
tornado.tcpserver
¶
TCPServer.bind
现在接受reuse_port
争论。
tornado.testing
¶
测试插座现在总是使用
127.0.0.1
而不是localhost
. 当自动分配的端口在IPv4上可用而不是在IPv6上可用时,或者在异常的网络配置中,当localhost
有多个IP地址。
tornado.web
¶
image/svg+xml
现在在可压缩的mime类型列表中。修正了当压缩与多个
Vary
标题。
tornado.websocket
¶
WebSocketHandler.__init__
现在使用super
,这提高了对多继承的支持。