]>
git.ipfire.org Git - thirdparty/tornado.git/log
schlamar [Tue, 6 May 2014 09:20:37 +0000 (11:20 +0200)]
Use constant for blocking errnos.
Ben Darnell [Tue, 6 May 2014 02:53:07 +0000 (22:53 -0400)]
Merge branch 'branch3.2'
Conflicts:
docs/releases.rst
setup.py
tornado/__init__.py
tornado/test/web_test.py
tornado/web.py
Ben Darnell [Tue, 6 May 2014 02:44:01 +0000 (22:44 -0400)]
Give credit to Joost Pol for reporting the security issue.
Ben Darnell [Tue, 6 May 2014 02:28:23 +0000 (22:28 -0400)]
Set version number to 3.2.1
Ben Darnell [Tue, 6 May 2014 02:27:20 +0000 (22:27 -0400)]
v3.2.1 release notes
Ben Darnell [Tue, 6 May 2014 01:58:22 +0000 (21:58 -0400)]
Document the cookie versioning interface.
Ben Darnell [Mon, 5 May 2014 02:59:12 +0000 (22:59 -0400)]
Add a v2 secure cookie format.
This format fixes some weaknesses in the original format that would allow
characters to be shifted from the "value" field to the "name" or "timestamp"
fields. It also upgrades the signature from HMAC-SHA1 to HMAC-SHA256,
adds an explicit version field, and adds an as-yet-unused field to
support key rotation in the future.
Ben Darnell [Mon, 5 May 2014 00:03:09 +0000 (20:03 -0400)]
Add versioning parameters to secure_cookie/signed_value APIs.
Ben Darnell [Tue, 6 May 2014 01:30:33 +0000 (21:30 -0400)]
Merge branch 'stable' into branch3.2
Matthew Brett [Tue, 8 Apr 2014 18:23:21 +0000 (11:23 -0700)]
Add SystemError to errors from compilation
OSX generates a SystemError from a missing compiler; trap with other
compilation errors.
Ben Darnell [Sat, 3 May 2014 16:09:35 +0000 (12:09 -0400)]
Relax this timing-sensitive test
Abhishek Kumar Singh [Wed, 16 Apr 2014 09:06:33 +0000 (14:36 +0530)]
Update overview.rst with typos in nginx conf.
Minor correction in the production nginx server conf with proxy_redirect as off; previously it was false.
Ben Darnell [Mon, 28 Apr 2014 03:20:16 +0000 (23:20 -0400)]
Document @authenticated's behavior around query parameters.
Closes #998.
Ben Darnell [Mon, 28 Apr 2014 03:15:19 +0000 (23:15 -0400)]
Merge pull request #1017 from SuminAndrew/curl-dns-timeouts
fix timeouts less than 1 sec when libcurl is compiled without c-ares
Ben Darnell [Mon, 28 Apr 2014 01:03:08 +0000 (21:03 -0400)]
Remove ca-certificates bundle and instead depend on the certifi package.
Ben Darnell [Sun, 27 Apr 2014 18:14:14 +0000 (14:14 -0400)]
Merge pull request #1021 from bdarnell/http_refactor
Major HTTP refactoring for streaming uploads
Ben Darnell [Sun, 27 Apr 2014 16:58:40 +0000 (12:58 -0400)]
Fix unix socket test on linux.
Unix socket addresses are bytes on linux (but str on mac). This mostly
works but causes errors in py3's -bb strict mode.
Ben Darnell [Sun, 27 Apr 2014 16:25:12 +0000 (12:25 -0400)]
Remove the has_body flag from write_headers.
It was only used client-side and we can infer whether we need to add
a framing mechanism from the method instead.
Ben Darnell [Sun, 27 Apr 2014 15:36:54 +0000 (11:36 -0400)]
Test and document the legacy HTTPRequest.write interface.
Ben Darnell [Sun, 27 Apr 2014 04:31:30 +0000 (00:31 -0400)]
Make HTTP1Connection and WSGIConnection subclasses of HTTPConnection.
Ben Darnell [Sun, 27 Apr 2014 04:07:15 +0000 (00:07 -0400)]
Remove unused protocol field from HTTP1ConnectionParams
Ben Darnell [Sun, 27 Apr 2014 03:56:16 +0000 (23:56 -0400)]
Document all the new HTTP stuff
Ben Darnell [Sun, 27 Apr 2014 00:32:10 +0000 (20:32 -0400)]
Merge branch 'master' into http_refactor
Conflicts:
tornado/iostream.py
Ben Darnell [Sun, 27 Apr 2014 00:13:46 +0000 (20:13 -0400)]
Update docs for changes in 3.3.
Ben Darnell [Sat, 26 Apr 2014 23:23:42 +0000 (19:23 -0400)]
Catch up on next-release notes.
Ben Darnell [Sat, 26 Apr 2014 23:11:09 +0000 (19:11 -0400)]
Return Futures from RequestHandler.flush and HTTP1Connection.write{,_headers}
Ben Darnell [Sat, 26 Apr 2014 21:07:41 +0000 (17:07 -0400)]
Add client-side support for Expect: 100-continue.
Don't send the 100-continue response if the header callback already sent
a response.
Ben Darnell [Sat, 26 Apr 2014 18:39:59 +0000 (14:39 -0400)]
Call the superclass's on_connection_close in this test.
This fixes the last py3.3 uncollectable garbage warning.
Ben Darnell [Sat, 26 Apr 2014 18:26:41 +0000 (14:26 -0400)]
Add on_close to HTTPServerConnectionDelegate.
Add close_all_connections method to HTTPServer for testing cleanup.
On Python versions before 3.4, the GC has problems with generators,
so the previous approach of closing all the file descriptors and
leave the rest to the GC no longer works. (Only Python 3.3 prints
the uncollectable garbage warnings, but the problem is present
in earlier versions).
Ben Darnell [Sat, 26 Apr 2014 17:06:15 +0000 (13:06 -0400)]
Add on_connection_close to the HTTPMessageDelegate interface.
This allows handlers to detect when the connection was closed during
the upload of the request body.
Ben Darnell [Mon, 21 Apr 2014 04:26:40 +0000 (00:26 -0400)]
Help out the CPython GC by clearing some references in IOLoop.close.
This prevents some of the ResourceWarnings from the test suite on python
3.3 (older versions didn't report the leaks; newer versions are better
at freeing generators). Since this is in IOLoop.close, it mainly
affects tests.
Ben Darnell [Mon, 21 Apr 2014 03:26:11 +0000 (23:26 -0400)]
Move HTTP/1.0 Connection: keep-alive behavior to http1connection.
Also remove the supports_http_1_1 check from GzipContentEncoding
since versions don't really matter with the accept-encoding check.
Ben Darnell [Sun, 20 Apr 2014 21:01:43 +0000 (17:01 -0400)]
Move address manipulation from HTTP1Connection to HTTPServer.
The connection now contains only an opaque 'origin' object to which
the caller can attach address info. This object can also be mutated
as in HTTPServer's xheader support.
Ben Darnell [Sun, 20 Apr 2014 20:16:39 +0000 (16:16 -0400)]
Clean up and comment http1connection internals.
Be specific about read/write vs request/response; the code moved from
HTTPServer often conflated the two.
Ben Darnell [Sun, 20 Apr 2014 17:58:49 +0000 (13:58 -0400)]
Make HTTP1Connection single-use-only.
The server loop is now on a separate HTTP1ServerConnection class.
Ben Darnell [Sun, 20 Apr 2014 14:28:23 +0000 (10:28 -0400)]
Synchronize chunk size between HTTP1Connection and IOStream.
Increase IOStream default chunk size to 64KB.
Ben Darnell [Sun, 20 Apr 2014 14:22:32 +0000 (10:22 -0400)]
Remove HTTPServer.__init__'s **kwargs.
New keyword arguments to this constructor are no longer likely to
be simple pass-through arguments to TCPServer.
Ben Darnell [Sun, 20 Apr 2014 05:01:20 +0000 (01:01 -0400)]
Add max_body_size and body_timeout limits to http1connection.
These limits can be set on a per-request basis during headers_received.
Ben Darnell [Sun, 20 Apr 2014 01:22:43 +0000 (21:22 -0400)]
Optimize gen.with_timeout for tornado futures.
We can avoid some IOLoop and stack_context interactions if we know
that the Future will resolve on the IOLoop's thread.
Ben Darnell [Sun, 20 Apr 2014 00:13:40 +0000 (20:13 -0400)]
Timeout micro-optimizations.
Use the (C) timedelta.total_seconds function when available. But it's
still a bit faster to use numeric timeouts instead of back-and-forth
through timedelta, so do that instead in http1connection.
Ben Darnell [Sat, 19 Apr 2014 22:51:36 +0000 (18:51 -0400)]
Use add_callback_from_signal in benchmark.py's sigchld handler.
This would manifest as an occasional deadlock when an 'ab' process
finished.
Ben Darnell [Sat, 19 Apr 2014 20:04:53 +0000 (16:04 -0400)]
Don't log errors about content-length mismatch when the connection closes.
Ben Darnell [Sat, 19 Apr 2014 19:05:56 +0000 (15:05 -0400)]
Add a max_bytes to one remaining read_until in http1connection.
Ben Darnell [Sat, 19 Apr 2014 02:16:55 +0000 (22:16 -0400)]
Read less aggressively in IOStream.
Previously, we would drain the socket buffer into the IOStream read buffer
before trying to satisfy application requests. This would result in
unnecessary memory use, and on a fast network reads could fail because the
buffer would fill up. Now we stop reading when we can satisfy the current
request (at least for read_bytes and read_until with max_bytes; unbounded
read_until still reads aggressively).
This commit includes a change to IOStream close_callback semantics. Since
the only way to reliably detect a closed connection (across all IOLoop
implementations) is to read past the end of the stream, the IOStream will
not detect a closed connection while there is some buffered data that could
satisfy a future read.
Closes #772.
Ben Darnell [Wed, 16 Apr 2014 13:27:13 +0000 (09:27 -0400)]
Merge pull request #1037 from toanant/patch-1
Update overview.rst with typos in nginx conf.
Abhishek Kumar Singh [Wed, 16 Apr 2014 09:06:33 +0000 (14:36 +0530)]
Update overview.rst with typos in nginx conf.
Minor correction in the production nginx server conf with proxy_redirect as off; previously it was false.
Ben Darnell [Mon, 14 Apr 2014 01:25:10 +0000 (21:25 -0400)]
Add a `streaming` option to _run_read_callback and move all calls to _consume
into that method.
Ben Darnell [Mon, 14 Apr 2014 00:52:26 +0000 (20:52 -0400)]
Fix IOStream.reading when Futures are used.
Reduce some duplication in IOStream _handle_read and _try_inline_read.
bdarnell [Sun, 13 Apr 2014 15:22:55 +0000 (11:22 -0400)]
Merge pull request #1034 from kouki-dan/work
Delete description for cookie capacity
Kouki Saito [Wed, 9 Apr 2014 10:31:27 +0000 (19:31 +0900)]
Delete description for cookie capacity
bdarnell [Wed, 9 Apr 2014 01:13:22 +0000 (21:13 -0400)]
Merge pull request #1030 from matthew-brett/fix-osx-no-compiler
Add SystemError to errors from compilation
bdarnell [Wed, 9 Apr 2014 01:12:12 +0000 (21:12 -0400)]
Merge pull request #1029 from daftshady/master
fixed broken reference link
Matthew Brett [Tue, 8 Apr 2014 18:23:21 +0000 (11:23 -0700)]
Add SystemError to errors from compilation
OSX generates a SystemError from a missing compiler; trap with other
compilation errors.
daftshady [Tue, 8 Apr 2014 17:50:36 +0000 (02:50 +0900)]
fixed broken reference link
bdarnell [Tue, 8 Apr 2014 12:04:37 +0000 (08:04 -0400)]
Fix typo
Closes #1028
Ben Darnell [Sun, 6 Apr 2014 13:17:59 +0000 (14:17 +0100)]
Add timeouts for idle keepalive connections in HTTPServer.
Add gen.with_timeout wrapper.
Ben Darnell [Sun, 6 Apr 2014 12:10:16 +0000 (13:10 +0100)]
Add a configurable header size limit to HTTPServer and simple_httpclient.
Ben Darnell [Sun, 6 Apr 2014 11:43:33 +0000 (12:43 +0100)]
Add max_bytes parameter to read_until and read_until_regex.
Ben Darnell [Sun, 6 Apr 2014 10:53:50 +0000 (11:53 +0100)]
Guard against framing errors when applications manually specify a Content-Type
that doesn't match the data they send.
Split HTTPMessageException into HTTPInputException and HTTPOutputException.
bdarnell [Mon, 31 Mar 2014 14:54:15 +0000 (10:54 -0400)]
Merge pull request #1023 from zakkie/feature/fix-testcase
put assertion outside of the exception handler
Akihiro Yamazaki [Sun, 30 Mar 2014 14:15:46 +0000 (23:15 +0900)]
correct testcases
Ben Darnell [Sat, 29 Mar 2014 17:23:32 +0000 (17:23 +0000)]
Implement flow control for streaming RequestHandlers.
Ben Darnell [Sat, 29 Mar 2014 16:22:55 +0000 (16:22 +0000)]
Add a chunk_size limitation to HTTP1Connection.
HTTPMessageDelegate will no longer receive more than chunk_size bytes
in a single call.
Ben Darnell [Sat, 29 Mar 2014 15:45:52 +0000 (15:45 +0000)]
Add a 'partial' flag to IOStream.read_bytes.
This is a more coroutine-friendly alternative to streaming_callback.
Ben Darnell [Sat, 29 Mar 2014 15:01:14 +0000 (15:01 +0000)]
Add body_producer argument to httpclient.HTTPRequest.
This allows for sending non-contiguous or asynchronously-produced
request bodies, including chunked encoding when the content-length
is not known in advance.
Ben Darnell [Sat, 29 Mar 2014 14:03:15 +0000 (14:03 +0000)]
Add option to disable the Resolver tests with an environment variable.
The resolver tests depend on external network resources; the twisted
resolver will time out when the network is unvailable instead of
returning an immediate failure like the other implementations.
Akihiro Yamazaki [Thu, 27 Mar 2014 15:27:39 +0000 (00:27 +0900)]
use "with self.assertRaises" pattern
Akihiro Yamazaki [Thu, 27 Mar 2014 00:37:29 +0000 (09:37 +0900)]
put assertion outside of the exception handler
bdarnell [Wed, 26 Mar 2014 01:56:01 +0000 (21:56 -0400)]
Merge pull request #1022 from shinriyo/master
tab to space
shinriyo [Wed, 26 Mar 2014 01:04:07 +0000 (10:04 +0900)]
tab to space
tab to space and indent fix
Ben Darnell [Mon, 24 Mar 2014 02:22:39 +0000 (22:22 -0400)]
When a streaming-body request finishes early, stop reading the request data.
delegate.data_received should no longer be called after conn.finish().
Ben Darnell [Mon, 24 Mar 2014 01:31:33 +0000 (21:31 -0400)]
Introduce streaming request body support for RequestHandler.
bdarnell [Mon, 24 Mar 2014 01:28:29 +0000 (21:28 -0400)]
Merge pull request #1020 from dhcmrlchtdj/fix-template-doc
Fix a mistake in template document.
Andrey Sumin [Sun, 23 Mar 2014 14:19:17 +0000 (18:19 +0400)]
suggest to use libcurl with async dns resolver in httpclient docs
huangxiaokai [Sun, 23 Mar 2014 10:25:25 +0000 (18:25 +0800)]
Fix a mistake in template document.
Ben Darnell [Sat, 22 Mar 2014 17:48:59 +0000 (13:48 -0400)]
Introduce a fast path for coroutines that run to completion without yielding.
This mitigates the performance impact of allowing coroutines in
RequestHandler._execute when that capability is not actually used.
bdarnell [Sat, 22 Mar 2014 17:20:06 +0000 (13:20 -0400)]
Merge pull request #1019 from minrk/clear_instance
add IOLoop.clear_instance
MinRK [Fri, 21 Mar 2014 17:59:25 +0000 (10:59 -0700)]
add IOLoop.clear_instance
like clear_current, but for the global IOLoop instance
Ben Darnell [Mon, 17 Mar 2014 04:25:10 +0000 (00:25 -0400)]
Simplify RequestHandler._execute by making it a coroutine.
Ben Darnell [Mon, 17 Mar 2014 02:17:38 +0000 (22:17 -0400)]
Stop overriding _execute in WebSocketHandler; use get() instead.
Revise HTTP1Connection detach protocol.
As a side effect, this now decodes the arguments to open() in the same
way as the arguments to get().
Ben Darnell [Sun, 16 Mar 2014 22:43:49 +0000 (18:43 -0400)]
Add chunk and callback arguments to write_headers.
This restores an optimization that allows small responses to be written out
in the same system call as the headers.
Ben Darnell [Sun, 16 Mar 2014 16:57:54 +0000 (12:57 -0400)]
Make Application an HTTPServerConnectionDelegate.
HTTPServer now forwards delegate events to its request callback
if it implements this interface. This allows the application to be
in the loop as the request is being read.
Ben Darnell [Sun, 16 Mar 2014 04:21:51 +0000 (00:21 -0400)]
HTTPServer: Support requests that are received in multiple chunks.
Ben Darnell [Sun, 16 Mar 2014 03:42:16 +0000 (23:42 -0400)]
Allow gzip to be used with WSGIApplication.
Now that transfer encodings have been moved to http1connection,
the content-level output transforms can be used with wsgi.
Ben Darnell [Sun, 16 Mar 2014 03:39:59 +0000 (23:39 -0400)]
Move chunked-response generation into http1connection.
Ben Darnell [Sun, 16 Mar 2014 03:00:13 +0000 (23:00 -0400)]
Pass start_line to headers_received as a tuple instead of a string.
Ben Darnell [Sun, 16 Mar 2014 02:30:23 +0000 (22:30 -0400)]
Unify WSGI support with the HTTPConnection abstraction.
Deprecate WSGIApplication in favor of a WSGIAdapter that can wrap
an ordinary Application.
Remove the wsgi module's separate HTTPRequest variant and tornado.web's
wsgi special cases.
Ben Darnell [Sun, 16 Mar 2014 00:11:02 +0000 (20:11 -0400)]
Move outgoing HTTP header generation to HTTP1Connection.
Ben Darnell [Sat, 15 Mar 2014 04:50:25 +0000 (00:50 -0400)]
Update links for comments about json list output.
The vulnerability in the older link affects only ancient browsers,
but there are other issues that are more recent.
Fixes #1009.
Ben Darnell [Sat, 15 Mar 2014 04:45:09 +0000 (00:45 -0400)]
Refactor unittest/unittest2 imports to fix issues with unittest2 on py3.
Never use unittest2 on python 3 (it appears to not interoperate with
the standard unittest module). On python 2, use the same logic in
tornado.testing and tornado.test.util to select an implementation.
Fixes #1005.
Ben Darnell [Thu, 13 Mar 2014 14:15:41 +0000 (10:15 -0400)]
Improve simple_httpclient ssl configuration to pass howsmyssl.com.
Remove insecure cipher suites and disable TLS compression. The option
to disable compression was only added in Python 3.3 so we do not
pass the test on older versions, but we come as close as possible with
the APIs available.
Closes #1014.
Ben Darnell [Thu, 13 Mar 2014 14:04:36 +0000 (10:04 -0400)]
Fix command-line tornado.httpclient on python 3.
bdarnell [Tue, 11 Mar 2014 04:09:28 +0000 (00:09 -0400)]
Merge pull request #1012 from dlutxx/br310
remove a redundant assignment in read_until_close.
bdarnell [Tue, 11 Mar 2014 02:32:17 +0000 (22:32 -0400)]
Merge pull request #1008 from yaccz/fix/1007
twisted can be installed without twisted.names fixes #1007
xuxiang [Mon, 10 Mar 2014 10:22:39 +0000 (18:22 +0800)]
remove useless code of BaseIOStream
yac [Sat, 8 Mar 2014 00:20:09 +0000 (01:20 +0100)]
twisted can be installed without twisted.names fixes #1007
bdarnell [Mon, 3 Mar 2014 15:59:18 +0000 (10:59 -0500)]
Merge pull request #996 from cardoe/exception-fix
use errno attr instead of index into args for errno
Ben Darnell [Mon, 3 Mar 2014 04:10:48 +0000 (23:10 -0500)]
Add a test for HTTPServer's recently-acquired support for chunked requests.
Ben Darnell [Mon, 3 Mar 2014 03:42:11 +0000 (22:42 -0500)]
Add support for gzipped request bodies to HTTPServer.
Ben Darnell [Mon, 3 Mar 2014 02:26:15 +0000 (21:26 -0500)]
Move gzip decompression from simple_httpclient to http1connection.