Romy Maxwell [Mon, 29 Nov 2010 09:44:51 +0000 (01:44 -0800)]
A few fixes for FacebookGraphMixin
- Added error handler for _on_access_token
- Modified to allow for extra returned fields in the auth call
- Removed username, which seems to have been deprecated
vijayp [Thu, 18 Nov 2010 18:58:44 +0000 (13:58 -0500)]
Set proxy to '' if no proxy is explicitly set in the request.
If this is not done, curls with proxies set are re-inserted into the empty list, and are then reused. This causes connections to be randomly proxied, if some requests use a proxy, and others don't.
Ben Darnell [Mon, 8 Nov 2010 19:27:27 +0000 (11:27 -0800)]
Fix mangled language names in tornado.locale for Chinese, Japanese, Korean.
For Chinese, also follow Google's example and reduce number of
variants to two: Simplified (zh_CN) and Traditional (zh_TW) (since I
couldn't find an appropriate copy-paste source for localized versions
of "Chinese (Hong Kong)" and "Chinese (Taiwan)")
Ben Darnell [Thu, 28 Oct 2010 04:23:29 +0000 (21:23 -0700)]
Don't manually set Content-Length in StaticFileHandler.
Content-Length will be set automatically in RequestHandler.finish. This
change fixes a bug in which RequestHandler.finish's Etag support strips
the response body without changing any headers. Transfer headers
(including Content-Length and Transfer-Encoding) are the responsibility
of the framework, not the "application-level" handlers (which includes
StaticFileHandler).
Make exception handling in AsyncHTTPClient more customizable
Call handle_callback_exception() with the callback as argument
instead of hardcoding the call to logging.debug(). This way, users
can add their own exception handling code by subclassing
AsyncHTTPClient.
Default implementation for handle_callback_exception() calls that
same function on the IOLoop associated to this AsyncHTTPClient
instance, so users can handle any exceptions raised from their
callbacks just by overriding handle_callback_exception() in IOLoop.
Ben Darnell [Tue, 19 Oct 2010 19:28:47 +0000 (12:28 -0700)]
Add test case for encoding of request parameters and paths,
in response to a mailing list thread that raised questions about
handling of '%3F' and '?'.
Matthew Graham [Sat, 9 Oct 2010 19:27:13 +0000 (15:27 -0400)]
make StaticFileHandler support default filename
allows an app to configure a handler so that if a request to '/dir', the
handler will return '/dir/index.html' if it exists. the default
filename, the 'index.html' part is configurable when creating the
Handler object. Using the default filename is optional.
Paul Buchheit [Thu, 30 Sep 2010 21:41:13 +0000 (14:41 -0700)]
add a linkify() function for converting text to html with link detection. Also changed xhtml_escape to not convert return value to utf8, since pages should be assembed in unicode and not utf8 encoded until they are ready to write().
Ben Darnell [Fri, 24 Sep 2010 18:42:33 +0000 (11:42 -0700)]
Make StackContext more usable in libraries by reducing the need to
explicitly use IOLoop.add_callback or NullContext.
This change also simplifies and codifies the ordering behavior of
StackContext: When a wrapped callback is executed, the innermost
StackContexts are those that were active when the callback was
wrapped. Additional StackContexts (possibly including other copies
of the same contexts) may be present in outer levels of the stack, but
since the role of most StackContexts is to catch exceptions this should
not have any effect.
Backwards compatibility note: StackContexts that do something other than
catch exceptions may need to be modified to be reentrant.
Ben Darnell [Thu, 16 Sep 2010 20:45:13 +0000 (13:45 -0700)]
Refactor IOStream reading logic to fix problems with SSL sockets.
Now reads from the socket until it would block. This ensures that we
see data in SSLSocket's internal buffers, which are otherwise invisible
to functions like select().
Added a test that makes a large POST request to an SSL server, which was
the scenario that originally exposed this bug.
When forking multiple processes, properly initialize the random seed
Avoid seeding the random module with the same value in all processes.
If available, use the same method used by random.py, otherwise
generate a seed using the current time in milliseconds and the pid.