]> git.ipfire.org Git - thirdparty/tornado.git/log
thirdparty/tornado.git
14 years agoCheck in symlink to tornado package in website directory
Ben Darnell [Fri, 13 Aug 2010 17:51:50 +0000 (10:51 -0700)] 
Check in symlink to tornado package in website directory

14 years agoUpdate links to 1.0.1 release
Ben Darnell [Fri, 13 Aug 2010 17:50:37 +0000 (10:50 -0700)] 
Update links to 1.0.1 release

14 years agoTest case for secure cookie change
Ben Darnell [Fri, 13 Aug 2010 17:19:26 +0000 (10:19 -0700)] 
Test case for secure cookie change

14 years agoCheck for far-future timestamps in secure cookies.
Ben Darnell [Fri, 13 Aug 2010 17:18:28 +0000 (10:18 -0700)] 
Check for far-future timestamps in secure cookies.

14 years agoAdd future import to fix tests on 2.5
Ben Darnell [Fri, 13 Aug 2010 07:34:23 +0000 (00:34 -0700)] 
Add future import to fix tests on 2.5

15 years agoAdd a mention of on_connection_close to the html docs. Add a
Ben Darnell [Wed, 11 Aug 2010 18:34:40 +0000 (11:34 -0700)] 
Add a mention of on_connection_close to the html docs.  Add a
warning about proxies keeping connections open.

15 years agoRemove the ability to pre-bind parameters in stack_context.wrap.
Ben Darnell [Tue, 10 Aug 2010 21:00:18 +0000 (14:00 -0700)] 
Remove the ability to pre-bind parameters in stack_context.wrap.

This functionality was incorrect and unused, and unlike async_callback,
I don't think the implicit binding is a good fit for this API.

15 years agoReindent everything to 4 spaces.
Ben Darnell [Tue, 10 Aug 2010 20:57:32 +0000 (13:57 -0700)] 
Reindent everything to 4 spaces.

15 years agoStackContext should not re-wrap previously-wrapped callbacks.
Ben Darnell [Tue, 10 Aug 2010 20:51:53 +0000 (13:51 -0700)] 
StackContext should not re-wrap previously-wrapped callbacks.

This allows for library code to "pop" back up to a previous version of the
stack.

15 years agoBe less picky about line endings in headers in httpclient.
Ben Darnell [Mon, 9 Aug 2010 21:33:32 +0000 (14:33 -0700)] 
Be less picky about line endings in headers in httpclient.

HTTP requires that lines end with \r\n, but some buggy servers (including
news.ycombinator.com) just use \n.  Libcurl tolerates this and sends the
line as-is to the header callback, so we need to be prepared to handle
either form.

15 years agoAdd a simple main function to httpclient.py for manual testing
Ben Darnell [Mon, 9 Aug 2010 21:12:33 +0000 (14:12 -0700)] 
Add a simple main function to httpclient.py for manual testing

15 years agoThe periodic call to multi_socket_all needs to be followed by
Ben Darnell [Mon, 9 Aug 2010 21:01:48 +0000 (14:01 -0700)] 
The periodic call to multi_socket_all needs to be followed by
 _finish_pending_request or else those requests won't be finished until
after the next one is started.

15 years agoRecord more detailed timing information from AsyncHTTPClient, and make
Ben Darnell [Fri, 6 Aug 2010 23:09:04 +0000 (16:09 -0700)] 
Record more detailed timing information from AsyncHTTPClient, and make
it available as HTTPResponse.time_info.

15 years agoWhen login_url is absolute, use an absolute url for the next redirect.
Ben Darnell [Fri, 6 Aug 2010 20:12:14 +0000 (13:12 -0700)] 
When login_url is absolute, use an absolute url for the next redirect.

Closes: GH-119
15 years agoUse the right IOLoop in AsyncHTTPClient's PeriodicCallback
Ben Darnell [Thu, 5 Aug 2010 01:47:42 +0000 (18:47 -0700)] 
Use the right IOLoop in AsyncHTTPClient's PeriodicCallback

15 years agoUse POST instead of GET for OpenID check_authentication.
Ben Darnell [Thu, 5 Aug 2010 00:42:07 +0000 (17:42 -0700)] 
Use POST instead of GET for OpenID check_authentication.

Google apparently doesn't check for this, but other OpenID providers do.

15 years agoSuppress libcurl's magic "Expect: 100-continue" behavior.
Ben Darnell [Thu, 5 Aug 2010 00:40:24 +0000 (17:40 -0700)] 
Suppress libcurl's magic "Expect: 100-continue" behavior.

This was motivated by the discovery of bug
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3039744&group_id=976

15 years agoAdd a brute-force workaround for the class of libcurl bugs that cause
Ben Darnell [Thu, 5 Aug 2010 00:30:20 +0000 (17:30 -0700)] 
Add a brute-force workaround for the class of libcurl bugs that cause
file descriptors or timeouts to get silently dropped.  (the old
fdset/perform implementation of AsycnHTTPClient had a similar workaround).

15 years agoFix a typo in docstring
Ben Darnell [Wed, 4 Aug 2010 21:00:34 +0000 (14:00 -0700)] 
Fix a typo in docstring

15 years agoParse form bodies on PUT as well as POST.
Ben Darnell [Wed, 4 Aug 2010 19:02:05 +0000 (12:02 -0700)] 
Parse form bodies on PUT as well as POST.

HTML5 adds support for PUT and DELETE in forms, so x-www-form-urlencoded
PUT bodies are now possible.

15 years agoWork around the "MySQL server has gone away" issue by closing and reopening
Ben Darnell [Tue, 3 Aug 2010 21:35:45 +0000 (14:35 -0700)] 
Work around the "MySQL server has gone away" issue by closing and reopening
connections that have been idle for too long.

15 years agoUse the more portable multiprocessing.cpu_count() to detect the number
Ben Darnell [Tue, 3 Aug 2010 21:21:24 +0000 (14:21 -0700)] 
Use the more portable multiprocessing.cpu_count() to detect the number
of cpus where available (python 2.6).

15 years agoAdd a workaround for missing multi.socket_action on older versions of pycurl.
Ben Darnell [Sat, 31 Jul 2010 00:22:53 +0000 (17:22 -0700)] 
Add a workaround for missing multi.socket_action on older versions of pycurl.

15 years agoOnly catch pycurl.error, not all Exceptions around a call to multi.socket_action.
Ben Darnell [Fri, 30 Jul 2010 23:47:13 +0000 (16:47 -0700)] 
Only catch pycurl.error, not all Exceptions around a call to multi.socket_action.

This was hiding an AttributeError being thrown on older versions of pycurl
(which did not expose the socket_action method).

15 years agoDocstring updates
Ben Darnell [Fri, 30 Jul 2010 21:21:37 +0000 (14:21 -0700)] 
Docstring updates

15 years agoFix a StackContext-related bug that was causing exceptions in callbacks
Ben Darnell [Fri, 30 Jul 2010 02:08:30 +0000 (19:08 -0700)] 
Fix a StackContext-related bug that was causing exceptions in callbacks
to result in timeouts instead of making wait() re-throw the exception.
Add a test to verify that this works.

15 years agoAdd __future__ import for python2.5 compatibility
Ben Darnell [Fri, 30 Jul 2010 02:01:13 +0000 (19:01 -0700)] 
Add __future__ import for python2.5 compatibility

15 years agoUpdate test_ioloop to use AsyncTestCase. Rename it to ioloop_test and
Ben Darnell [Fri, 30 Jul 2010 02:00:06 +0000 (19:00 -0700)] 
Update test_ioloop to use AsyncTestCase.  Rename it to ioloop_test and
make other stylistic changes for consistency.

15 years agoAdd a test framework for IOLoop-based async code
Ben Darnell [Fri, 30 Jul 2010 01:53:18 +0000 (18:53 -0700)] 
Add a test framework for IOLoop-based async code

15 years agoMake all internal imports of tornado modules absolute
Ben Darnell [Fri, 30 Jul 2010 00:03:40 +0000 (17:03 -0700)] 
Make all internal imports of tornado modules absolute

15 years agoAdd an initialize() method to RequestHandler for use by subclasses.
Ben Darnell [Mon, 26 Jul 2010 19:04:00 +0000 (12:04 -0700)] 
Add an initialize() method to RequestHandler for use by subclasses.

This is simpler than overriding __init__ since it doesn't require
knowledge of the application and request arguments that must be
passed through to the superclass's __init__.

15 years agoRemove unused transforms parameter to RequestHandler.__init__.
Ben Darnell [Mon, 26 Jul 2010 18:49:05 +0000 (11:49 -0700)] 
Remove unused transforms parameter to RequestHandler.__init__.
Transforms are actually passed in via _execute.

15 years agoIntroduce StackContext, a way to automatically manage exception
Ben Darnell [Fri, 23 Jul 2010 19:35:08 +0000 (12:35 -0700)] 
Introduce StackContext, a way to automatically manage exception
handling and other stack-related state for asynchronous callbacks.
This means that it is no longer necessary to wrap everything
in RequestHandler.async_callback.

15 years agoRemove the old AsyncHTTPClient (fdset) and make AsyncHTTPClient2
Ben Darnell [Fri, 23 Jul 2010 18:12:56 +0000 (11:12 -0700)] 
Remove the old AsyncHTTPClient (fdset) and make AsyncHTTPClient2
(socket_action) the standard.

15 years agoSet version number to 1.0 v1.0.0
Ben Darnell [Thu, 22 Jul 2010 22:15:37 +0000 (15:15 -0700)] 
Set version number to 1.0

15 years agoRemove old release tarballs and redirect previous urls to github
Ben Darnell [Thu, 22 Jul 2010 23:50:59 +0000 (16:50 -0700)] 
Remove old release tarballs and redirect previous urls to github

15 years agoMove download links to github
Ben Darnell [Thu, 22 Jul 2010 22:13:25 +0000 (15:13 -0700)] 
Move download links to github

15 years agoRemove websocket.py. The websocket protocol has changed in
Ben Darnell [Thu, 22 Jul 2010 21:29:07 +0000 (14:29 -0700)] 
Remove websocket.py.  The websocket protocol has changed in
incompatible ways (and is still not yet final), so the version
implemented in this module is not compatible with current
browsers.  This module may be reintroduced in the future when
we have an implementation of the new protocol.

15 years agoUpdate installation instructions.
Ben Darnell [Thu, 22 Jul 2010 20:04:10 +0000 (13:04 -0700)] 
Update installation instructions.

15 years agoAccept None (i.e. unmatched optional groups) when extracting parameters from
Ben Darnell [Tue, 20 Jul 2010 17:25:25 +0000 (10:25 -0700)] 
Accept None (i.e. unmatched optional groups) when extracting parameters from
the path.

http://github.com/facebook/tornado/issues/issue/115

15 years agoWhen no json library is found, don't throw an exception unless
Ben Darnell [Tue, 20 Jul 2010 02:39:42 +0000 (19:39 -0700)] 
When no json library is found, don't throw an exception unless
json functionality is used, to make the simplejson dependency optional
for python 2.5 users.

15 years agoCheck for EINTR in a more flexible way for compatibility with older pythons
Ben Darnell [Mon, 19 Jul 2010 20:09:28 +0000 (13:09 -0700)] 
Check for EINTR in a more flexible way for compatibility with older pythons
and poll implementations.

Original commit:
http://github.com/eklitzke/tornado/commit/31c33737c5534f21a99371bb21e02cd4791f9010

15 years agoFix typo in support for multiple ui_method/ui_module containers
Ben Darnell [Thu, 15 Jul 2010 01:12:16 +0000 (18:12 -0700)] 
Fix typo in support for multiple ui_method/ui_module containers

15 years agoBetter timeout handling in AsyncHTTPClient2. Tornado and libcurl may
Ben Darnell [Wed, 14 Jul 2010 23:31:22 +0000 (16:31 -0700)] 
Better timeout handling in AsyncHTTPClient2.  Tornado and libcurl may
use different clock functions, which can cause timeouts to be delayed
(in some cases until the next fetch is started).  This change
resynchronizes the schedule after each timeout call.

15 years agoFix small bug in database set up.
David Novakovic [Wed, 14 Jul 2010 11:00:57 +0000 (21:00 +1000)] 
Fix small bug in database set up.

15 years agoMake iteration over sql fields clearer
Robert Buchholz [Tue, 13 Jul 2010 08:28:52 +0000 (10:28 +0200)] 
Make iteration over sql fields clearer

15 years agoRemove unused imports and variables
Robert Buchholz [Tue, 13 Jul 2010 08:26:01 +0000 (10:26 +0200)] 
Remove unused imports and variables

15 years agoIn AsyncHTTPClient2, disable IPv6 for versions of libcurl with the
Ben Darnell [Sat, 10 Jul 2010 01:15:12 +0000 (18:15 -0700)] 
In AsyncHTTPClient2, disable IPv6 for versions of libcurl with the
socket-reopening bug (i.e. <= 7.21.0).  (this can be overridden if needed
with a prepare_curl_callback)

15 years agoUnquote percent escapes in captured groups in the path component of the URI,
Ben Darnell [Fri, 9 Jul 2010 20:07:43 +0000 (13:07 -0700)] 
Unquote percent escapes in captured groups in the path component of the URI,
to be more consistent with our handling of query parameters.

This change is slightly backwards-incompatible:  applications that have
already added an unquote() call on arguments to RequestHandler.get/post
will need to remove them.

This change replaces an earlier (reverted) commit:
http://github.com/facebook/tornado/commit/7b80c2f4db226d6fa3a7f3dfa59277da1d642f91

15 years agoRevert "Parse percent escapes in the path component of the uri, to be more"
Ben Darnell [Fri, 9 Jul 2010 19:57:01 +0000 (12:57 -0700)] 
Revert "Parse percent escapes in the path component of the uri, to be more"

This reverts commit 7b80c2f4db226d6fa3a7f3dfa59277da1d642f91.

URI spec requires that '/' and '%2F' be distinguishable, so it's incorrect
to escape at this level.  The next commit will instead unquote captured
groups before passing them to get()/post() in web.py

15 years agoParse percent escapes in the path component of the uri, to be more
Ben Darnell [Fri, 9 Jul 2010 01:27:43 +0000 (18:27 -0700)] 
Parse percent escapes in the path component of the uri, to be more
consistent with our handling of query parameters (especially important
when capturing groups are used in the URLSpec regex).

This change is slightly backwards-incompatible:  applications that have
already added an unquote() call on arguments to RequestHandler.get/post
or use percent escapes in URLSpec patterns will need to remove them.

15 years agoConsolidate the various HTTP header dictionary classes into one,
Ben Darnell [Fri, 9 Jul 2010 00:06:03 +0000 (17:06 -0700)] 
Consolidate the various HTTP header dictionary classes into one,
which includes better handling of headers with repeated values
(e.g. Set-Cookie)

15 years agoDisable preforking by default in HTTPServer.start().
Ben Darnell [Thu, 8 Jul 2010 22:52:44 +0000 (15:52 -0700)] 
Disable preforking by default in HTTPServer.start().

This makes "server.listen(port)" and "server.bind(port);
server.start()" equivalent.

15 years agoUTF8-encode more user-supplied strings in httpclient (headers and user-agent)
Ben Darnell [Mon, 28 Jun 2010 16:52:46 +0000 (09:52 -0700)] 
UTF8-encode more user-supplied strings in httpclient (headers and user-agent)

15 years agoUpdate the set of active file descriptors immediately after calling perform
Ben Darnell [Sat, 26 Jun 2010 23:00:26 +0000 (16:00 -0700)] 
Update the set of active file descriptors immediately after calling perform
instead of after running user callbacks, since those callbacks might have
started using file descriptors that were closed by curl in perform().

Thanks to David Novakovic for the fix.  Adapted from
http://github.com/dpnova/tornado/commit/6df99e948e0832c60966f7c34190de87af87ffc5

15 years agoInclude the HTTPResponse object as an attribute of HTTPError
Ben Darnell [Sat, 26 Jun 2010 22:16:15 +0000 (15:16 -0700)] 
Include the HTTPResponse object as an attribute of HTTPError

15 years agoRemove unused "overwrite" argument to options.parse_config_file
Ben Darnell [Thu, 24 Jun 2010 01:01:30 +0000 (18:01 -0700)] 
Remove unused "overwrite" argument to options.parse_config_file

15 years agoFix typo in comment
Ben Darnell [Mon, 21 Jun 2010 16:29:27 +0000 (09:29 -0700)] 
Fix typo in comment

15 years agoAdd a second implementation of AsyncHTTPClient, using a new libcurl api.
Ben Darnell [Sun, 20 Jun 2010 02:38:02 +0000 (19:38 -0700)] 
Add a second implementation of AsyncHTTPClient, using a new libcurl api.

Adapted from Jacob Kristhammar's work:
http://github.com/sris/tornado/blob/master/tornado/httpclient2.py

15 years agoClose wsgi responses correctly - the close method, if present, will
Ben Darnell [Fri, 18 Jun 2010 22:59:19 +0000 (15:59 -0700)] 
Close wsgi responses correctly - the close method, if present, will
be on the result of self.wsgi_application() and not on the list
of output we're building up.

15 years agoIn the libcurl file descriptor limit hack, log to both stderr and
Ben Darnell [Thu, 10 Jun 2010 21:49:57 +0000 (14:49 -0700)] 
In the libcurl file descriptor limit hack, log to both stderr and
logging.error since they may got to different places and one may be
more visible than the other.

15 years agoCatch and log exceptions from user callbacks in AsyncHTTPClient.
Ben Darnell [Tue, 8 Jun 2010 18:48:43 +0000 (11:48 -0700)] 
Catch and log exceptions from user callbacks in AsyncHTTPClient.

15 years agoFix missing import
Ben Darnell [Mon, 7 Jun 2010 07:43:59 +0000 (00:43 -0700)] 
Fix missing import

15 years agoOptionally allow nonstandard http methods to be used in httpclient.
Ben Darnell [Mon, 31 May 2010 06:04:10 +0000 (23:04 -0700)] 
Optionally allow nonstandard http methods to be used in httpclient.

By default we check that the method is one of the standard ones (and
is capitalized correctly), but this can be overridden to work with a
server that has implemented nonstandard methods (e.g. CouchDB)

http://github.com/facebook/tornado/issues/issue/90

15 years agoChanged it so one can access the StringIO buffer
Mike Lewis [Thu, 27 May 2010 22:38:37 +0000 (15:38 -0700)] 
Changed it so one can access the StringIO buffer

This allows for people to use the file-like object
that already exists without having to convert the body
back to the StringIO

15 years agoClear the close_callback set on the IOStream by RequestHandlers in
Ben Darnell [Mon, 31 May 2010 05:50:11 +0000 (22:50 -0700)] 
Clear the close_callback set on the IOStream by RequestHandlers in
finish(), so that the close_callback does not prevent garbage collection
of the handlers.

http://github.com/facebook/tornado/issues/issue/95/

15 years agoClose the socket on uncaught exceptions from iostream handlers.
Ben Darnell [Mon, 31 May 2010 05:42:53 +0000 (22:42 -0700)] 
Close the socket on uncaught exceptions from iostream handlers.

This prevents a possible denial of service if erroneous requests are
made faster than garbage collection can reclaim socket file
descriptors.

http://groups.google.com/group/python-tornado/browse_frm/thread/7a5d61e6ba0c71b8/8af41b48ac02cc6c

15 years agoImprove parsing of multipart/form-data headers.
Ben Darnell [Mon, 31 May 2010 05:16:11 +0000 (22:16 -0700)] 
Improve parsing of multipart/form-data headers.

This change was motivated by google app engine's xmpp support,
which uses different spacing in the header than other common clients
and quotes its boundary string.

Based on changes by jehiah:
http://github.com/jehiah/tornado/commit/18cb45ca73859fa81883bd10c9cd8e051865096a
http://github.com/jehiah/tornado/commit/9d67963466878550368b932746bb4a244a593905

15 years agoAdded RequestHandler.get_arguments(), which does the same normalization
Ben Darnell [Mon, 31 May 2010 04:56:44 +0000 (21:56 -0700)] 
Added RequestHandler.get_arguments(), which does the same normalization
as get_argument() but returns a list for repeated arguments.

Based on changes by jehiah:
http://github.com/jehiah/tornado/commit/cbe2eeb1753de7d1a16a86c6a96b5f8e7c99dd52
http://github.com/jehiah/tornado/commit/af08ab067fb7ad1661fc56039004cbd86356716c

15 years agoUpdate documentation for WebSocketHandler
Ben Darnell [Sat, 29 May 2010 00:25:59 +0000 (17:25 -0700)] 
Update documentation for WebSocketHandler

15 years agoRevert "websockets: continue listening for messages after parsing completion"
Ben Darnell [Sat, 29 May 2010 00:12:34 +0000 (17:12 -0700)] 
Revert "websockets: continue listening for messages after parsing completion"

This reverts commit 9ea5f8a277db96557ae7867375c7db4d8c5f633a.

The one-shot behavior of receive_message was intentional, and simply
requeuing the old callback every time will eventually overflow the
stack due to repeated async_callback wrappers.  An alternate interface
that doesn't require receive_message to be called for every message
may be added in a future change.

See discussion at
http://github.com/facebook/tornado/commit/9ea5f8a277db96557ae7867375c7db4d8c5f633a

15 years agoAllow StaticFileHandler subclasses to set additional headers on the response
Ben Darnell [Tue, 25 May 2010 21:36:50 +0000 (14:36 -0700)] 
Allow StaticFileHandler subclasses to set additional headers on the response

15 years agoDon't try to compute max() of an empty sequence (which throws an exception)
Ben Darnell [Tue, 25 May 2010 18:40:42 +0000 (11:40 -0700)] 
Don't try to compute max() of an empty sequence (which throws an exception)

15 years agoAdd a hacky workaround for libcurl's FD_SETSIZE bug. It's ugly,
Ben Darnell [Tue, 25 May 2010 02:06:31 +0000 (19:06 -0700)] 
Add a hacky workaround for libcurl's FD_SETSIZE bug.  It's ugly,
but better than undefined behavior.

15 years agoMake it possible to override template_path at the handler level
Ben Darnell [Thu, 20 May 2010 20:50:03 +0000 (13:50 -0700)] 
Make it possible to override template_path at the handler level

15 years agoUse a lambda instead of functools.partial for pycurl.HEADERFUNCTION.
Ben Darnell [Mon, 17 May 2010 02:33:59 +0000 (19:33 -0700)] 
Use a lambda instead of functools.partial for pycurl.HEADERFUNCTION.
Older versions of pycurl (including 7.16.2.1, which is the recommended
version for Mac OS X 10.5) only work with real functions, not objects
with a __call__ method like functools.partial.

Remove exception-swallowing - curl versions that predate HEADERFUNCTION
are no longer supported.

15 years agoMerge remote branch 'dlo/master'
Ben Darnell [Mon, 10 May 2010 01:54:34 +0000 (18:54 -0700)] 
Merge remote branch 'dlo/master'

15 years agoTranslate </ to <\/ in json output to avoid issues with the string
Ben Darnell [Mon, 10 May 2010 01:51:49 +0000 (18:51 -0700)] 
Translate </ to <\/ in json output to avoid issues with the string
"</script>".

15 years agoSupport additional keyword arguments on cookies (to be handled by the
Ben Darnell [Mon, 10 May 2010 01:46:06 +0000 (18:46 -0700)] 
Support additional keyword arguments on cookies (to be handled by the
underlying stdlib Cookie module)

15 years agowebsockets: continue listening for messages after parsing completion
Dan Loewenherz [Tue, 4 May 2010 22:59:22 +0000 (15:59 -0700)] 
websockets: continue listening for messages after parsing completion

The prior implementation stops listening for messages after the first
message is received.

15 years agoAllow for missing "expires" field in facebook session, which can
Ben Darnell [Sat, 1 May 2010 00:28:40 +0000 (17:28 -0700)] 
Allow for missing "expires" field in facebook session, which can
happen if offline_access is granted.

15 years agoCorrecting a grammatical error (attribute -> attributes).
Jon Parise [Thu, 29 Apr 2010 06:27:45 +0000 (23:27 -0700)] 
Correcting a grammatical error (attribute -> attributes).

15 years agoUIModule.css_files returns CSS files, not Javascript files
Evan Klitzke [Mon, 26 Apr 2010 21:41:22 +0000 (05:41 +0800)] 
UIModule.css_files returns CSS files, not Javascript files

15 years agoUpdating base Twitter url
Joseph Bowman [Sat, 24 Apr 2010 02:26:49 +0000 (22:26 -0400)] 
Updating base Twitter url

15 years agoClear itimer signals in autoreload so the combination of autoreload
Ben Darnell [Thu, 22 Apr 2010 23:12:41 +0000 (16:12 -0700)] 
Clear itimer signals in autoreload so the combination of autoreload
and ioloop.set_blocking_log_threshold doesn't cause the new process
to get killed.

15 years agoUse escape.utf8() instead of .encode('utf-8') so we don't double-encode
Ben Darnell [Wed, 21 Apr 2010 21:17:22 +0000 (14:17 -0700)] 
Use escape.utf8() instead of .encode('utf-8') so we don't double-encode

15 years agocStringIO's constructor uses a 16-bit encoding when given a unicode
Ben Darnell [Wed, 21 Apr 2010 20:57:05 +0000 (13:57 -0700)] 
cStringIO's constructor uses a 16-bit encoding when given a unicode
string.  This is inconsistent with its write method, which encodes all
strings as ascii (and rejects unicode strings iff they have any
non-ascii characters).  This change uses utf-8 as the default encoding
when constructing cStringIO objects in tornado.

15 years agoAdd an option to log a stack trace any time the ioloop is blocked for
Ben Darnell [Wed, 21 Apr 2010 18:57:44 +0000 (11:57 -0700)] 
Add an option to log a stack trace any time the ioloop is blocked for
more than a specified amount of time.

15 years agoSend all logging to the root logger instead of per-module loggers.
Ben Darnell [Tue, 20 Apr 2010 22:40:33 +0000 (15:40 -0700)] 
Send all logging to the root logger instead of per-module loggers.
This undoes the effect of
http://github.com/facebook/tornado/commit/e391fd289ed085671344504cc5b1fa84f5a3c774

Per-module loggers are problematic because only the top-level convenience
logging.{error,warning,...} functions configure logging on-demand, so
an app that only uses per-module loggers will produce no output except
"no handlers found for logger X".  Since tornado.ioloop swallows and logs
all exceptions, this makes it too hard to tell what's going on for apps
that do not configure logging explicitly.

Instead of setting log levels on individual module's loggers,
logging.Handler.addFilter can be used with a filter that examines
the module attribute of the log record.

15 years agoFix header parsing in httpclient for headers whose value contains ':'
Ben Darnell [Tue, 20 Apr 2010 00:07:20 +0000 (17:07 -0700)] 
Fix header parsing in httpclient for headers whose value contains ':'

15 years agoBetter HTTP header parsing: Allow (and strip) any amount of leading
Ben Darnell [Mon, 19 Apr 2010 18:20:03 +0000 (11:20 -0700)] 
Better HTTP header parsing: Allow (and strip) any amount of leading
and trailing whitespace around header values instead of just a single
space.  Such whitespace is legal but appears to be uncommon (and nginx
apparently normalizes everything to a single space)
http://tools.ietf.org/html/rfc2616#page-31

15 years agoAdd a closed flag to AsyncHTTPClient so that a scheduled perform callback
Ben Darnell [Mon, 19 Apr 2010 18:03:06 +0000 (11:03 -0700)] 
Add a closed flag to AsyncHTTPClient so that a scheduled perform callback
won't cause an exception after the client is closed.

15 years agoUse the original request's protocol as the openid realm instead of hard-coding
Ben Darnell [Mon, 12 Apr 2010 23:06:39 +0000 (16:06 -0700)] 
Use the original request's protocol as the openid realm instead of hard-coding
http.

15 years agoAdd support for reading translation from gettext .mo files instead of CSV.
Ben Darnell [Wed, 7 Apr 2010 23:54:34 +0000 (16:54 -0700)] 
Add support for reading translation from gettext .mo files instead of CSV.

Based on http://github.com/wmark/anzu/commits/gettext

15 years agoLog a warning when multiple handlers have the same name.
Ben Darnell [Mon, 5 Apr 2010 21:21:16 +0000 (14:21 -0700)] 
Log a warning when multiple handlers have the same name.

15 years agoMake options.__getattr__ raise AttributeError instead of Error for consistency
Ben Darnell [Mon, 5 Apr 2010 19:23:24 +0000 (12:23 -0700)] 
Make options.__getattr__ raise AttributeError instead of Error for consistency
with standard attribute lookups (so getattr(options, 'foo', None) works
if no option 'foo' has been defined).

15 years agoEscape double quotes in addition to angle brackets and ampersands.
Ben Darnell [Fri, 2 Apr 2010 18:47:39 +0000 (11:47 -0700)] 
Escape double quotes in addition to angle brackets and ampersands.

15 years agoAdding for the ability of ui-modules to add something at the end of the body of a...
Elias Torres [Mon, 15 Feb 2010 05:10:11 +0000 (00:10 -0500)] 
Adding for the ability of ui-modules to add something at the end of the body of a document.

15 years agoMerge remote branch 'mgenti/master'
Ben Darnell [Fri, 2 Apr 2010 18:32:18 +0000 (11:32 -0700)] 
Merge remote branch 'mgenti/master'

15 years agoReturn a write method from start_response, as required by the wsgi spec.
Ben Darnell [Wed, 31 Mar 2010 22:37:29 +0000 (15:37 -0700)] 
Return a write method from start_response, as required by the wsgi spec.