Expand documentation of WebSocketHandler.check_origin.

Document the potential problems that arise with websockets and
self-signed certificates.
Merge branch 'branch4.0'
Implement permessage-deflate websocket extension.

Parameters to the extension are not fully supported (the client side
supports client_no_context_takeover which is mandatory to implement,
but the server rejects any parameters offered by the client, and neither
side supports setting wbits).

Closes #308.
Closes #668.
Support the max_wbits websocket deflate parameters.

Slightly improve error handling in the websocket handshake.
Fix a memory leak and test timeout in websockets.

In some cases (primarily when prepare() is asynchronous), an
HTTP1ServerConnection could be left waiting forever for a connection
to finish when that connection has been detached and handed off to a
WebSocketHandler.  This would manifest as a leak and a timeout in
tests as the HTTPServer waited for all its existing connections to
finish.

Also fix a bug in the test tearDown method that would actually
wait forever for connections to finish instead of timing out.

Closes #1133.
Fix `PeriodicCallback' when callback function return `Future' and has
`Exception' will silence ignore
Merge pull request #1138 from zhicheng/master

Fix `PeriodicCallback' when callback function return `Future' and has
Start the next-release notes doc.
Forgot to git add the new file.
Merge pull request #1 from tornadoweb/master

update from upstream
Fix `IOStream' when callback function return `Future' and has
`Exception' will silence ignore
Merge pull request #1142 from zhicheng/master

Fix `IOStream' when callback function return `Future' and has `Exception' will silence ignore
Fix an AttributeError in WebSocketClientConnection._on_close.

Fix an issue that was preventing this issue from showing up in my
tests.

Closes #1140.
Correctly handle 204 response codes that do not include a content-length.

If a server sends a 204 with no content-length we would wait for the server
to close the connection instead of ending the request (any such servers
are ignoring the "Connection: close" header we send, but apparently exist).

Move some content-length logic from simple_httpclient.py to http1connection.py.

Fix the client-side use of on_connection_close; this affects the
handling of any HTTPInputException.

This fixes regressions relative to Tornado 3.2.
Fall back to pure-python mode on any exception during the build.

Stop the futile process of trying to enumerate which kinds of exceptions
distutils may throw (the latest potential addition: ValueError).

Closes #1115.
Add missing return statements to call_at and call_later.

Closes #1119.
Fix `PeriodicCallback' when callback function return `Future' and has
`Exception' will silence ignore
Fix `IOStream' when callback function return `Future' and has
`Exception' will silence ignore
Fix an AttributeError in WebSocketClientConnection._on_close.

Fix an issue that was preventing this issue from showing up in my
tests.

Closes #1140.
Correctly handle 204 response codes that do not include a content-length.

If a server sends a 204 with no content-length we would wait for the server
to close the connection instead of ending the request (any such servers
are ignoring the "Connection: close" header we send, but apparently exist).

Move some content-length logic from simple_httpclient.py to http1connection.py.

Fix the client-side use of on_connection_close; this affects the
handling of any HTTPInputException.

This fixes regressions relative to Tornado 3.2.

Conflicts:
	tornado/websocket.py