]> git.ipfire.org Git - thirdparty/tornado.git/log
thirdparty/tornado.git
11 years agoTest Python 3.4 on Travis. 1055/head
Marc Schlaich [Mon, 12 May 2014 08:00:35 +0000 (10:00 +0200)] 
Test Python 3.4 on Travis.

11 years agoDecouple read_from_buffer's search for the endpoint from consuming the data.
Ben Darnell [Mon, 12 May 2014 03:43:55 +0000 (23:43 -0400)] 
Decouple read_from_buffer's search for the endpoint from consuming the data.

This lets us call find_read_pos from read_to_buffer_loop, avoiding some
unnecessary reads (e.g. it previously took a minimum of two recv calls
to serve an http request, but now we can do it in one).

11 years agoIOStream: do not listen for close events if there is no close_callback.
Ben Darnell [Mon, 12 May 2014 00:23:33 +0000 (20:23 -0400)] 
IOStream: do not listen for close events if there is no close_callback.

HTTP1Connection now only registers its close callback when it is done
reading.  This improves performance for synchronous handlers, which no
longer interact with the IOLoop as often.

11 years agoAdd gen.moment, a yieldable object that resumes after one IOLoop iteration.
Ben Darnell [Sun, 11 May 2014 22:49:40 +0000 (18:49 -0400)] 
Add gen.moment, a yieldable object that resumes after one IOLoop iteration.

Use this between requests in HTTP1ServerConnection to keep one connection
from monopolizing the IOLoop when there are pipelined (or just fast) requests
available.  This was causing increased variance in benchmarks using "ab -k"
(it also increased throughput, for reasons that are not yet clear, so this
change reduces observed speed in these benchmarks).

11 years agoImprove performance by using Future interface when writing HTTP responses.
Ben Darnell [Sat, 10 May 2014 17:27:46 +0000 (13:27 -0400)] 
Improve performance by using Future interface when writing HTTP responses.

Previously, we passed a callback to IOStream.write() and also checked
IOStream.writing() to see if the write completed synchronously (which is
the common case).  If it did, we would complete the request immediately
but the write callback would remain on the IOLoop until its next iteration,
keeping the request state from being garbage collected.

In benchmarks, this would manifest as as something like a memory leak,
since benchmarks often handle many requests in one IOLoop iteration.
This slowed things down (by about 10% in my benchmarks) by increasing
pressure on the garbage collector.

11 years agoMerge pull request #1042 from moijes12/fix1033_2
Ben Darnell [Fri, 9 May 2014 00:54:42 +0000 (20:54 -0400)] 
Merge pull request #1042 from moijes12/fix1033_2

Changed _on_close method tornado/simple_httpclient.py to raise the error instead of raising an HTTPError

11 years agoAdd a test with newlines in template tags to control whitespace in output.
Ben Darnell [Thu, 8 May 2014 03:06:01 +0000 (23:06 -0400)] 
Add a test with newlines in template tags to control whitespace in output.

11 years agoMerge pull request #1045 from schlamar/fix-win-tests
Ben Darnell [Tue, 6 May 2014 12:57:17 +0000 (08:57 -0400)] 
Merge pull request #1045 from schlamar/fix-win-tests

Fixed tests on Windows.

11 years agoMerge pull request #1044 from schlamar/wouldblock-const
Ben Darnell [Tue, 6 May 2014 12:55:34 +0000 (08:55 -0400)] 
Merge pull request #1044 from schlamar/wouldblock-const

Use constant for blocking errnos.

11 years agoFixed tests on Windows. 1045/head
schlamar [Tue, 6 May 2014 09:35:51 +0000 (11:35 +0200)] 
Fixed tests on Windows.

11 years agoUse constant for blocking errnos. 1044/head
schlamar [Tue, 6 May 2014 09:20:37 +0000 (11:20 +0200)] 
Use constant for blocking errnos.

11 years agoMerge branch 'branch3.2'
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

11 years agoGive credit to Joost Pol for reporting the security issue.
Ben Darnell [Tue, 6 May 2014 02:44:01 +0000 (22:44 -0400)] 
Give credit to Joost Pol for reporting the security issue.

11 years agoSet version number to 3.2.1 v3.2.1
Ben Darnell [Tue, 6 May 2014 02:28:23 +0000 (22:28 -0400)] 
Set version number to 3.2.1

11 years agov3.2.1 release notes
Ben Darnell [Tue, 6 May 2014 02:27:20 +0000 (22:27 -0400)] 
v3.2.1 release notes

11 years agoDocument the cookie versioning interface.
Ben Darnell [Tue, 6 May 2014 01:58:22 +0000 (21:58 -0400)] 
Document the cookie versioning interface.

11 years agoAdd a v2 secure cookie format.
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.

11 years agoAdd versioning parameters to secure_cookie/signed_value APIs.
Ben Darnell [Mon, 5 May 2014 00:03:09 +0000 (20:03 -0400)] 
Add versioning parameters to secure_cookie/signed_value APIs.

11 years agoMerge branch 'stable' into branch3.2
Ben Darnell [Tue, 6 May 2014 01:30:33 +0000 (21:30 -0400)] 
Merge branch 'stable' into branch3.2

11 years agoAdd SystemError to errors from compilation
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.

11 years agoChanged tornado/simple_httpclient.py to raise the error instead of 1042/head
moijes12 [Sun, 4 May 2014 18:22:05 +0000 (23:52 +0530)] 
Changed tornado/simple_httpclient.py to raise the error instead of
storing the error message and then raising an HTTPError.
Changed the websocket tests for network_fail and network timeout to
expect an IOError instead of an HTTPError.

11 years agoRelax this timing-sensitive test
Ben Darnell [Sat, 3 May 2014 16:09:35 +0000 (12:09 -0400)] 
Relax this timing-sensitive test

11 years agoUpdate 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.

11 years agoDocument @authenticated's behavior around query parameters.
Ben Darnell [Mon, 28 Apr 2014 03:20:16 +0000 (23:20 -0400)] 
Document @authenticated's behavior around query parameters.

Closes #998.

11 years agoMerge pull request #1017 from SuminAndrew/curl-dns-timeouts
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

11 years agoRemove ca-certificates bundle and instead depend on the certifi package.
Ben Darnell [Mon, 28 Apr 2014 01:03:08 +0000 (21:03 -0400)] 
Remove ca-certificates bundle and instead depend on the certifi package.

11 years agoMerge pull request #1021 from bdarnell/http_refactor
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

11 years agoFix unix socket test on linux. 1021/head
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.

11 years agoRemove the has_body flag from write_headers.
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.

11 years agoTest and document the legacy HTTPRequest.write interface.
Ben Darnell [Sun, 27 Apr 2014 15:36:54 +0000 (11:36 -0400)] 
Test and document the legacy HTTPRequest.write interface.

11 years agoMake HTTP1Connection and WSGIConnection subclasses of HTTPConnection.
Ben Darnell [Sun, 27 Apr 2014 04:31:30 +0000 (00:31 -0400)] 
Make HTTP1Connection and WSGIConnection subclasses of HTTPConnection.

11 years agoRemove unused protocol field from HTTP1ConnectionParams
Ben Darnell [Sun, 27 Apr 2014 04:07:15 +0000 (00:07 -0400)] 
Remove unused protocol field from HTTP1ConnectionParams

11 years agoDocument all the new HTTP stuff
Ben Darnell [Sun, 27 Apr 2014 03:56:16 +0000 (23:56 -0400)] 
Document all the new HTTP stuff

11 years agoMerge branch 'master' into http_refactor
Ben Darnell [Sun, 27 Apr 2014 00:32:10 +0000 (20:32 -0400)] 
Merge branch 'master' into http_refactor

Conflicts:
tornado/iostream.py

11 years agoUpdate docs for changes in 3.3.
Ben Darnell [Sun, 27 Apr 2014 00:13:46 +0000 (20:13 -0400)] 
Update docs for changes in 3.3.

11 years agoCatch up on next-release notes.
Ben Darnell [Sat, 26 Apr 2014 23:23:42 +0000 (19:23 -0400)] 
Catch up on next-release notes.

11 years agoReturn Futures from RequestHandler.flush and HTTP1Connection.write{,_headers}
Ben Darnell [Sat, 26 Apr 2014 23:11:09 +0000 (19:11 -0400)] 
Return Futures from RequestHandler.flush and HTTP1Connection.write{,_headers}

11 years agoAdd client-side support for Expect: 100-continue.
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.

11 years agoCall the superclass's on_connection_close in this test.
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.

11 years agoAdd on_close to HTTPServerConnectionDelegate.
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).

11 years agoAdd on_connection_close to the HTTPMessageDelegate interface.
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.

11 years agoHelp out the CPython GC by clearing some references in IOLoop.close.
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.

11 years agoMove HTTP/1.0 Connection: keep-alive behavior to http1connection.
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.

11 years agoMove address manipulation from HTTP1Connection to HTTPServer.
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.

11 years agoClean up and comment http1connection internals.
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.

11 years agoMake HTTP1Connection single-use-only.
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.

11 years agoSynchronize chunk size between HTTP1Connection and IOStream.
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.

11 years agoRemove HTTPServer.__init__'s **kwargs.
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.

11 years agoAdd max_body_size and body_timeout limits to http1connection.
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.

11 years agoOptimize gen.with_timeout for tornado futures.
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.

11 years agoTimeout micro-optimizations.
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.

11 years agoUse add_callback_from_signal in benchmark.py's sigchld handler.
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.

11 years agoDon't log errors about content-length mismatch when the connection closes.
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.

11 years agoAdd a max_bytes to one remaining read_until in http1connection.
Ben Darnell [Sat, 19 Apr 2014 19:05:56 +0000 (15:05 -0400)] 
Add a max_bytes to one remaining read_until in http1connection.

11 years agoRead less aggressively in IOStream.
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.

11 years agoMerge pull request #1037 from toanant/patch-1
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.

11 years agoUpdate overview.rst with typos in nginx conf. 1037/head
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.

11 years agoAdd a `streaming` option to _run_read_callback and move all calls to _consume
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.

11 years agoFix IOStream.reading when Futures are used.
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.

11 years agoMerge pull request #1034 from kouki-dan/work
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

11 years agoDelete description for cookie capacity 1034/head
Kouki Saito [Wed, 9 Apr 2014 10:31:27 +0000 (19:31 +0900)] 
Delete description for cookie capacity

11 years agoMerge pull request #1030 from matthew-brett/fix-osx-no-compiler
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

11 years agoMerge pull request #1029 from daftshady/master
bdarnell [Wed, 9 Apr 2014 01:12:12 +0000 (21:12 -0400)] 
Merge pull request #1029 from daftshady/master

fixed broken reference link

11 years agoAdd SystemError to errors from compilation 1030/head
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.

11 years agofixed broken reference link 1029/head
daftshady [Tue, 8 Apr 2014 17:50:36 +0000 (02:50 +0900)] 
fixed broken reference link

11 years agoFix typo
bdarnell [Tue, 8 Apr 2014 12:04:37 +0000 (08:04 -0400)] 
Fix typo

Closes #1028

11 years agoAdd timeouts for idle keepalive connections in HTTPServer.
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.

11 years agoAdd a configurable header size limit to HTTPServer and simple_httpclient.
Ben Darnell [Sun, 6 Apr 2014 12:10:16 +0000 (13:10 +0100)] 
Add a configurable header size limit to HTTPServer and simple_httpclient.

11 years agoAdd max_bytes parameter to read_until and read_until_regex.
Ben Darnell [Sun, 6 Apr 2014 11:43:33 +0000 (12:43 +0100)] 
Add max_bytes parameter to read_until and read_until_regex.

11 years agoGuard against framing errors when applications manually specify a Content-Type
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.

11 years agoMerge pull request #1023 from zakkie/feature/fix-testcase
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

11 years agocorrect testcases 1023/head
Akihiro Yamazaki [Sun, 30 Mar 2014 14:15:46 +0000 (23:15 +0900)] 
correct testcases

11 years agoImplement flow control for streaming RequestHandlers.
Ben Darnell [Sat, 29 Mar 2014 17:23:32 +0000 (17:23 +0000)] 
Implement flow control for streaming RequestHandlers.

11 years agoAdd a chunk_size limitation to HTTP1Connection.
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.

11 years agoAdd a 'partial' flag to IOStream.read_bytes.
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.

11 years agoAdd body_producer argument to httpclient.HTTPRequest.
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.

11 years agoAdd option to disable the Resolver tests with an environment variable.
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.

11 years agouse "with self.assertRaises" pattern
Akihiro Yamazaki [Thu, 27 Mar 2014 15:27:39 +0000 (00:27 +0900)] 
use "with self.assertRaises" pattern

11 years agoput assertion outside of the exception handler
Akihiro Yamazaki [Thu, 27 Mar 2014 00:37:29 +0000 (09:37 +0900)] 
put assertion outside of the exception handler

11 years agoMerge pull request #1022 from shinriyo/master
bdarnell [Wed, 26 Mar 2014 01:56:01 +0000 (21:56 -0400)] 
Merge pull request #1022 from shinriyo/master

tab to space

11 years agotab to space 1022/head
shinriyo [Wed, 26 Mar 2014 01:04:07 +0000 (10:04 +0900)] 
tab to space

tab to space and indent fix

11 years agoWhen a streaming-body request finishes early, stop reading the request data.
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().

11 years agoIntroduce streaming request body support for RequestHandler.
Ben Darnell [Mon, 24 Mar 2014 01:31:33 +0000 (21:31 -0400)] 
Introduce streaming request body support for RequestHandler.

11 years agoMerge pull request #1020 from dhcmrlchtdj/fix-template-doc
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.

11 years agosuggest to use libcurl with async dns resolver in httpclient docs 1017/head
Andrey Sumin [Sun, 23 Mar 2014 14:19:17 +0000 (18:19 +0400)] 
suggest to use libcurl with async dns resolver in httpclient docs

11 years agoFix a mistake in template document. 1020/head
huangxiaokai [Sun, 23 Mar 2014 10:25:25 +0000 (18:25 +0800)] 
Fix a mistake in template document.

11 years agoIntroduce a fast path for coroutines that run to completion without yielding.
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.

11 years agoMerge pull request #1019 from minrk/clear_instance
bdarnell [Sat, 22 Mar 2014 17:20:06 +0000 (13:20 -0400)] 
Merge pull request #1019 from minrk/clear_instance

add IOLoop.clear_instance

11 years agoadd IOLoop.clear_instance 1019/head
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

11 years agoSimplify RequestHandler._execute by making it a coroutine.
Ben Darnell [Mon, 17 Mar 2014 04:25:10 +0000 (00:25 -0400)] 
Simplify RequestHandler._execute by making it a coroutine.

11 years agoStop overriding _execute in WebSocketHandler; use get() instead.
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().

11 years agoAdd chunk and callback arguments to write_headers.
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.

11 years agoMake Application an HTTPServerConnectionDelegate.
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.

11 years agoHTTPServer: Support requests that are received in multiple chunks.
Ben Darnell [Sun, 16 Mar 2014 04:21:51 +0000 (00:21 -0400)] 
HTTPServer: Support requests that are received in multiple chunks.

11 years agoAllow gzip to be used with WSGIApplication.
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.

11 years agoMove chunked-response generation into http1connection.
Ben Darnell [Sun, 16 Mar 2014 03:39:59 +0000 (23:39 -0400)] 
Move chunked-response generation into http1connection.

11 years agoPass start_line to headers_received as a tuple instead of a string.
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.

11 years agoUnify WSGI support with the HTTPConnection abstraction.
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.

11 years agoMove outgoing HTTP header generation to HTTP1Connection.
Ben Darnell [Sun, 16 Mar 2014 00:11:02 +0000 (20:11 -0400)] 
Move outgoing HTTP header generation to HTTP1Connection.

11 years agoUpdate links for comments about json list output.
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.