Commit Graph

919 Commits

Author SHA1 Message Date
Ben Darnell 76dd88f1bc Merge remote-tracking branch 'lerks/master' into work 2012-01-22 14:10:14 -08:00
Ben Darnell 1b38b58da8 Update websocket chat demo to work when not addressed as localhost.
Turn on draft76 support.
2012-01-21 17:39:37 -08:00
Ben Darnell 3beb8ce480 Merge remote-tracking branch 'MrJoes/master' into work
Conflicts:
	tornado/websocket.py
2012-01-21 17:28:07 -08:00
Ben Darnell 442b49f866 Refactor websocket close logic; remove dependency on singleton IOLoop. 2012-01-21 17:20:10 -08:00
Ben Darnell 5a18d50f44 Disable slow websocket performance tests by default.
Add pypy to the mix for when we do run the perf tests.  Depending on
the benchmark pypy is ~twice as fast as cpython 2.7
2012-01-21 17:12:22 -08:00
Ben Darnell bc28966ef5 Remove stray log line 2012-01-21 16:16:36 -08:00
Ben Darnell ea0291b256 Check if the stream is closed before writing final websocket close packet.
Closes #390.
2012-01-21 16:02:28 -08:00
Ben Darnell eee9953dcb Websocket subprotocol updates.
Failure to select a subprotocol is not fatal, so rename method from
validate_subprotocol to select_subprotocol.  Subprotocols are a
comma-separated list in the RFC version, but a single value in
draft76.
2012-01-21 16:02:12 -08:00
Ben Darnell 1cfcc4a7bc Merge remote-tracking branch 'davidgaleano/master' into work
Conflicts:
	tornado/websocket.py
2012-01-21 15:15:12 -08:00
Ben Darnell cc671cb55c Allow handlers to override the selection of "ws" or "wss" in the draft76
handshake, to work with SSL proxies that do not insert an X-Scheme header.

Closes #437.
2012-01-21 14:56:43 -08:00
Ben Darnell 4edf2782b5 Merge remote-tracking branch 'nephics/master' into work 2012-01-21 14:45:51 -08:00
Ben Darnell 1014d5683e Check in a requirements file for the tools I use while working on tornado. 2012-01-21 14:35:21 -08:00
Ben Darnell 35139ff82c Add .coveragerc for test coverage reporting.
Closes #439.
2012-01-21 14:10:00 -08:00
Ben Darnell 8b668633ad Add 307 too and update release notes. 2012-01-18 01:17:30 -08:00
Ben Darnell 24d96f0286 Merge remote-tracking branch 'amorton/master'
Conflicts:
	tornado/test/simple_httpclient_test.py
2012-01-18 01:11:21 -08:00
Ben Darnell 97b4b15cda Release note updates for twitter client changes 2012-01-18 01:00:06 -08:00
Ben Darnell 76ba232345 Make TwitterMixin.twitter_request accept complete urls, not just partial paths.
Closes #418.
2012-01-18 00:57:55 -08:00
Ben Darnell cadfb90116 Merge remote-tracking branch 'gutomaia/master' 2012-01-18 00:51:30 -08:00
Ben Darnell 6dfc1b75d2 Add RequestHandler.on_finish method.
Closes #367.
2012-01-18 00:43:38 -08:00
Ben Darnell af940f4e0b Major update to tornado.platform.twisted.
Significantly improved compatibility (most important changes are in
TornadoReactor._invoke_callback) and expanded test coverage.
2012-01-16 23:30:41 -08:00
Ben Darnell 36226505ba Support non-integer timeouts for curl_httpclient.
Closes #399.
2012-01-13 23:12:39 -08:00
Ben Darnell 4457f2b9f8 Add a fourth release status field to tornado.version_info.
Closes #432.
2012-01-13 23:07:37 -08:00
Ben Darnell fea44c7b4e Release note update 2012-01-13 23:06:49 -08:00
Ben Darnell 9fcf106a6d Merge remote-tracking branch 'pkienzle/master' 2012-01-13 22:51:26 -08:00
Ben Darnell e552346a49 The Connection request header should be case-insensitive. 2012-01-13 22:46:08 -08:00
Ben Darnell 26a06a0b16 Add a new(er) ubuntu vm setup to test missing SSLv2 2012-01-10 10:26:15 -08:00
Ben Darnell b8939293f3 Some python/openssl builds don't have SSLv2 compiled in, so skip the
test in this case.
2012-01-10 10:24:10 -08:00
Paul Kienzle 5d240e4924 make sure addresses returned from getaddrinfo are unique 2012-01-10 12:41:43 -05:00
Ben Darnell f62e915404 Release notes for the last two ssl changes 2012-01-09 23:50:43 -08:00
Ben Darnell dbe1c9bc84 Disable SSLv2 in simple_httpclient.
Contrary to the python documentation, SSLv2 is enabled by default
unless openssl version 1.0 or newer is used; older versions appear
to still be in use (e.g. in Ubuntu 10.04 LTS and Mac OS X Lion)
2012-01-09 11:59:24 -08:00
Ben Darnell 17052f33c9 Make SSLIOStream compatible with SSLv3- and TLSv1-only servers.
Due to some implementation detail the default SSLv23 mode allows reads
before the handshake has completed, but the other modes do not.

Closes #431.
2012-01-09 11:56:44 -08:00
Ben Darnell 98f77972ae Make it possible to run the test suite with --httpclient=CurlAsyncHTTPClient 2012-01-08 13:49:30 -08:00
Ben Darnell 0a949c07be Update docs for recent websocket changes 2012-01-08 00:01:18 -08:00
Ben Darnell ef4f2bb0e1 Disable websocket draft76 protocol by default. 2012-01-07 23:24:30 -08:00
Ben Darnell 33cd3456d5 Add an explicit binary option to WebSocketHandler.write_message.
Switching automatically based on python's bytes vs unicode types is
error-prone in python2 where e.g. json_encode returns bytes.

Closes #429.
2012-01-07 17:34:48 -08:00
Jacob Sondergaard 756fadac7c Set the request cookies property to an empty dict if cookie parsing fails
This commit reverses the bug introduced in commit 4a4d871, leaving an
undefined cookies property on failure to parse a request cookie.

The bug results in a 'NoneType is not iterable' error when calling
RequestHandler.get_cookie() after a cookie parsing exception.
2012-01-05 12:17:01 +01:00
Ben Darnell bd03493335 Handle redirects before processing data and sending it to streaming_callback.
Previously, if you were using follow_redirects and streaming_callback
and hit a redirect with a non-empty body, that body would be passed
to streaming_callback as well.

As a side effect, this improves compatibility with some misconfigured
sites that send Content-Encoding: gzip on redirects without actually
compressing the body.
2012-01-05 00:27:45 -08:00
Ben Darnell 4c23ba7e78 Make fork_processes raise SystemExit instead of returning None when
all child processes exit cleanly.
2012-01-03 21:19:51 -08:00
Ben Darnell ffa8f152ab Add comment about (non-)thread-safety of IOLoop.add_timeout. 2012-01-02 19:17:57 -08:00
Ben Darnell 468754e31f Release note updates 2012-01-01 23:19:48 -08:00
Ben Darnell 8fbe7c7d11 Rewrite IP check to use getaddrinfo instead of inet_pton (more portable).
Closes #392.
2012-01-01 22:54:36 -08:00
Ben Darnell 5650d90747 Merge remote-tracking branch 'davidwilemski/xheaders-xss' into work 2012-01-01 22:26:12 -08:00
Ben Darnell ac9902cbe3 Use a StackContext to allow exceptions thrown from asynchronous functions
called by a generator to be caught normally.

Closes #405.
Closes #411.
2012-01-01 19:20:05 -08:00
Ben Darnell 008e605ec6 Allow exceptions thrown in the first (synchronous) phase of a gen.Task
to be caught by the generator.
2012-01-01 16:17:35 -08:00
Ben Darnell 494ae50ad3 Increase maximum IOLoop poll timeout.
I believe the previous 0.2s limit was there to work around an old bug in
the add_callback waker that has since been fixed.
2012-01-01 14:00:13 -08:00
Ben Darnell ad63265338 Support status codes other than 301 and 302 in RequestHandler.redirect().
Closes #228.
Closes #424.
2011-12-30 20:20:25 -08:00
Ben Darnell 7f5d4de759 Avoid merging the entire read buffer for IOStream.read_until.
Among other things, this dramatically speeds up downloads of large
chunked files over a fast network with SimpleHTTPClient.

Fixes #425.
2011-12-30 16:19:49 -08:00
Ben Darnell 0b31d8de4c bytearray is a 2.6ism; use array.array("B") instead for 2.5 compatibility. 2011-12-30 14:47:21 -08:00
Ben Darnell 84250a37a9 Invert fragment-handling logic for clarity 2011-12-30 13:29:12 -08:00
Ben Darnell 9f32af1770 Improve websocket conformance as reported by autobahn.
Of note:
* It's now possible to send binary frames (auto-switched based on
  whether the argument to write_message is bytes or unicode)
* Invalid utf8 in text frames is now an error
* Lots of fragmentation-related improvements
2011-12-30 12:54:36 -08:00