]> git.ipfire.org Git - thirdparty/tornado.git/log
thirdparty/tornado.git
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.

15 years agoWhen using the select based IOLoop, select can throw an error if based to many socket...
unknown [Tue, 30 Mar 2010 13:40:17 +0000 (08:40 -0500)] 
When using the select based IOLoop, select can throw an error if based to many socket.  This does not have an errno

15 years agoDon't try to colorize log output on terminals that don't support it
Ben Darnell [Sat, 27 Mar 2010 17:30:46 +0000 (10:30 -0700)] 
Don't try to colorize log output on terminals that don't support it

15 years agoMake add_handlers (for multiple hostnames) usable with static_path (which
Ben Darnell [Fri, 26 Mar 2010 22:55:04 +0000 (15:55 -0700)] 
Make add_handlers (for multiple hostnames) usable with static_path (which
forces the creation of a wildcard handler) by maintaining a sensible order
for handler groups.

15 years agoAdd a warning about the experimental status of our win32 support
Ben Darnell [Thu, 25 Mar 2010 23:09:37 +0000 (16:09 -0700)] 
Add a warning about the experimental status of our win32 support

15 years agoBe consistent in platform checks: use os.name == 'nt' everywhere, replacing
Ben Darnell [Thu, 25 Mar 2010 23:00:09 +0000 (16:00 -0700)] 
Be consistent in platform checks:  use os.name == 'nt' everywhere, replacing
uses of os.name == 'posix' and sys.platform.startswith('win')

15 years agoMake ioloop test runnable on unix (chmod +x and add #! line), and remove
Ben Darnell [Thu, 25 Mar 2010 22:59:18 +0000 (15:59 -0700)] 
Make ioloop test runnable on unix (chmod +x and add #! line), and remove
hard-coded PYTHONPATH manipulations.  Add a small readme for tests.

15 years agoFix for raising an exception;
unknown [Wed, 24 Mar 2010 15:14:03 +0000 (10:14 -0500)] 
Fix for raising an exception;
Fix for waking loop;
Added test

15 years agoMerge branch 'master' of git://github.com/facebook/tornado
unknown [Wed, 24 Mar 2010 13:25:23 +0000 (08:25 -0500)] 
Merge branch 'master' of git://github.com/facebook/tornado

15 years agoUse per-module loggers instead of the root logger.
Brandon Bickford [Mon, 15 Mar 2010 21:48:17 +0000 (14:48 -0700)] 
Use per-module loggers instead of the root logger.

15 years agoAdd __slots__ to ioloop._Timeout to reduce memory overhead when there are
Ben Darnell [Wed, 24 Mar 2010 00:31:14 +0000 (17:31 -0700)] 
Add __slots__ to ioloop._Timeout to reduce memory overhead when there are
many pending timeouts.

15 years agoImplementing suggested changes
unknown [Tue, 23 Mar 2010 14:29:46 +0000 (09:29 -0500)] 
Implementing suggested changes

15 years agoMerge remote branch 'upstream/master'
unknown [Tue, 23 Mar 2010 14:24:34 +0000 (09:24 -0500)] 
Merge remote branch 'upstream/master'

15 years agoDon't put wsgi response headers in a dictionary to support repeated
Ben Darnell [Mon, 22 Mar 2010 23:35:05 +0000 (16:35 -0700)] 
Don't put wsgi response headers in a dictionary to support repeated
headers with the same value (mainly important for Set-Cookie)

15 years agoDon't set the etag header if the handler already did it.
Ben Darnell [Sat, 20 Mar 2010 19:20:42 +0000 (12:20 -0700)] 
Don't set the etag header if the handler already did it.

15 years agoAdd a callback to handle headers in httpclient as they come in, so
Ben Darnell [Fri, 19 Mar 2010 18:20:56 +0000 (11:20 -0700)] 
Add a callback to handle headers in httpclient as they come in, so
they will be available for data handled by streaming_callback.

15 years agoAdd a close method to AsyncHTTPClient.
Ben Darnell [Thu, 18 Mar 2010 20:27:49 +0000 (13:27 -0700)] 
Add a close method to AsyncHTTPClient.

15 years agoadd a template_loader application setting for using custom template loaders. a slight...
Dolapo Falola [Thu, 18 Mar 2010 01:44:16 +0000 (18:44 -0700)] 
add a template_loader application setting for using custom template loaders. a slight refactoring of TemplateLoader's load method to expose some internals. also, add a reset method to the loader that's called in debug mode to flush the template cache.

15 years agoSupport named groups in url pattern regexes. Note that either all or none
Ben Darnell [Thu, 18 Mar 2010 01:51:37 +0000 (18:51 -0700)] 
Support named groups in url pattern regexes.  Note that either all or none
of the groups to be passed to the handler must be named.

15 years agoAllow more than two consecutive curlies to appear in templates (and use
Ben Darnell [Thu, 18 Mar 2010 01:48:32 +0000 (18:48 -0700)] 
Allow more than two consecutive curlies to appear in templates (and use
the innermost).  This was previously a syntax error in the generated python.

15 years agoCombine repeated headers with the same name into a single comma-separated string
Ben Darnell [Thu, 18 Mar 2010 01:29:03 +0000 (18:29 -0700)] 
Combine repeated headers with the same name into a single comma-separated string
http://www.w3.org/Protocols/HTTP/1.0/spec.html#Message-Headers

15 years agoReplace all tabs with spaces.
Ben Darnell [Wed, 17 Mar 2010 21:59:17 +0000 (14:59 -0700)] 
Replace all tabs with spaces.

15 years agoupdated the gitignore to include files generated on installation
Fabricio Zuardi [Sun, 14 Mar 2010 03:08:26 +0000 (00:08 -0300)] 
updated the gitignore to include files generated on installation

15 years agowin32 needs to open the files as binary
unknown [Wed, 10 Mar 2010 21:40:36 +0000 (15:40 -0600)] 
win32 needs to open the files as binary

15 years agoTrying to better re-use code
unknown [Wed, 10 Mar 2010 21:39:50 +0000 (15:39 -0600)] 
Trying to better re-use code

15 years agoMerge remote branch 'upstream/master'
unknown [Wed, 10 Mar 2010 21:37:58 +0000 (15:37 -0600)] 
Merge remote branch 'upstream/master'

15 years agoFix bug with IOLoop's 'waker' pipe which rendered it ineffective on linux
Ben Darnell [Tue, 9 Mar 2010 17:17:23 +0000 (09:17 -0800)] 
Fix bug with IOLoop's 'waker' pipe which rendered it ineffective on linux
and mac (where pipes are unidirectional) and caused high cpu usage
on solaris (where pipes are bidirectional).  Thanks to Jari Ahonen for
finding the bug.

15 years agoIn finish(), test if chunk is None rather than using truthiness to decide
Ben Darnell [Sun, 7 Mar 2010 20:47:52 +0000 (12:47 -0800)] 
In finish(), test if chunk is None rather than using truthiness to decide
whether to call write().

This fixes a discrepancy between finish() and write() when outputting json.
Now both write({}) and finish({}) will output an empty json object.

15 years agoSet the close-on-exec flag on file descriptors used by IOLoop (epoll/kqueue
Ben Darnell [Thu, 4 Mar 2010 20:30:26 +0000 (12:30 -0800)] 
Set the close-on-exec flag on file descriptors used by IOLoop (epoll/kqueue
and pipe) so that long-lived autoreloading processes don't leak file
descriptors.

15 years agoUse a WeakKeyDictionary instead of a regular dictionary to associate
Ben Darnell [Thu, 4 Mar 2010 19:52:18 +0000 (11:52 -0800)] 
Use a WeakKeyDictionary instead of a regular dictionary to associate
IOLoop and AsyncHTTPClients.  This prevents leaks of memory and file
descriptors when one process (in my case a unit test runner) create
many IOLoop/AsyncHTTPClient pairs.

15 years agoAllow subclasses of IOLoop to override the default logging of
Ben Darnell [Thu, 4 Mar 2010 03:14:45 +0000 (19:14 -0800)] 
Allow subclasses of IOLoop to override the default logging of
uncaught exceptions in callbacks.

15 years agoEnsure that self.io_loop is set in HTTPServer.start(), so that HTTPServer.stop
Ben Darnell [Thu, 4 Mar 2010 01:22:48 +0000 (17:22 -0800)] 
Ensure that self.io_loop is set in HTTPServer.start(), so that HTTPServer.stop
can clean up correctly.

15 years agoRevamp logging configuration.
Ben Darnell [Tue, 2 Mar 2010 02:55:38 +0000 (18:55 -0800)] 
Revamp logging configuration.

* If --logging=none, tornado will not touch the python logging config.
* Colored output is optional.  If curses is not available or stderr is not
  a tty, non-colorized output will be used.
* Log output to stderr can be suppressed with --log_to_stderr=false
* Logs can be written to a file (non-colorized) with --log_file_prefix.
  Logs will be rotated, which can be controlled with --log_file_max_size
  and --log_file_num_backups.
* By default, logs go to a file if --log_file_prefix is set and to stderr
  if it is not.  To log to both stderr and a file, --log_to_stderr must
  be set to true explicitly.

15 years agoCall the close() method on the wsgi response object if it exists.
Ben Darnell [Sat, 27 Feb 2010 00:36:21 +0000 (16:36 -0800)] 
Call the close() method on the wsgi response object if it exists.
This is required by the WSGI spec, and cherrypy leaks memory without it.

15 years agoAdd SERVER_PROTOCOL variable to wsgi environment. This turns out to be
Ben Darnell [Fri, 26 Feb 2010 22:08:09 +0000 (14:08 -0800)] 
Add SERVER_PROTOCOL variable to wsgi environment.  This turns out to be
necessary for using cherrypy in a tornado WSGIContainer.

15 years agoAdd exc_info parameter to start_response() in WSGIContainer.
Ben Weaver [Fri, 26 Feb 2010 18:11:27 +0000 (13:11 -0500)] 
Add exc_info parameter to start_response() in WSGIContainer.

15 years agoWork around an odd error I occasionally see in autoreload (which causes
Ben Darnell [Thu, 25 Feb 2010 23:49:08 +0000 (15:49 -0800)] 
Work around an odd error I occasionally see in autoreload (which causes
autoreload to loop endlessly without restarting the process)

15 years agoAdd a workaround for a bug in os.execv when used on Mac OS X versions
Ben Darnell [Thu, 25 Feb 2010 00:37:11 +0000 (16:37 -0800)] 
Add a workaround for a bug in os.execv when used on Mac OS X versions
prior to 10.6 when there are multiple threads in the process.

15 years agoAlways reraise KeyboardInterrupt and SystemExit whenever IOLoop tries to
Ben Darnell [Wed, 24 Feb 2010 23:18:39 +0000 (15:18 -0800)] 
Always reraise KeyboardInterrupt and SystemExit whenever IOLoop tries to
swallow exceptions.

15 years agoFix ioloop._KQueue to work correctly when listening for both read and write.
Ben Darnell [Tue, 16 Feb 2010 20:47:32 +0000 (12:47 -0800)] 
Fix ioloop._KQueue to work correctly when listening for both read and write.

kqueue.control must be called separately for each type of filter, not just
once with the filters or'd together.

Fixes http://github.com/facebook/tornado/issues/issue/59/
Change adapted from
http://github.com/weaver/tornado/commit/97e528cf6b92bbb590579864962e2d51c22202e0

15 years agoSupport passing in cookie value directly in cases where you have to parse the value...
Bret Taylor [Fri, 5 Feb 2010 18:24:57 +0000 (10:24 -0800)] 
Support passing in cookie value directly in cases where you have to parse the value from other sources (e.g., from the URL for Flash requests). Also fix documentation error for Facebook Connect.

15 years agoDon't set content-length in StaticFileHandler unless we're actually
Ben Darnell [Thu, 4 Feb 2010 21:18:43 +0000 (13:18 -0800)] 
Don't set content-length in StaticFileHandler unless we're actually
sending the content.  Some browsers get confused by this (e.g. the
version of webkit embedded in fluid, but not the version used in chrome).

15 years agoAdd backwards compatability for secure cookie reading
Bret Taylor [Thu, 4 Feb 2010 08:02:09 +0000 (00:02 -0800)] 
Add backwards compatability for secure cookie reading

15 years agoSimplify JavaScript path ordering patch
Bret Taylor [Thu, 4 Feb 2010 07:51:20 +0000 (23:51 -0800)] 
Simplify JavaScript path ordering patch

15 years agoImport setuptools if it's available.
Ben Darnell [Wed, 3 Feb 2010 23:49:05 +0000 (15:49 -0800)] 
Import setuptools if it's available.

15 years agoMaking sure StaticFileHandlers get first, if not, a catch all handler would break...
Elias Torres [Wed, 3 Feb 2010 23:02:11 +0000 (18:02 -0500)] 
Making sure StaticFileHandlers get first, if not, a catch all handler would break the static handlers.

15 years agoInclude cookie name in signature so that a value signed for use in one
Ben Darnell [Wed, 3 Feb 2010 20:18:44 +0000 (12:18 -0800)] 
Include cookie name in signature so that a value signed for use in one
cookie can't be used in another.  Note that this invalidates all existing
signed cookies.

15 years agousing os specific path seperator
unknown [Wed, 3 Feb 2010 20:17:28 +0000 (14:17 -0600)] 
using os specific path seperator

15 years agoFix for maintaining script inclusion order
Elias Torres [Thu, 12 Nov 2009 22:27:11 +0000 (17:27 -0500)] 
Fix for maintaining script inclusion order

15 years agoAdded the ability to stop an HTTPServer. Mostly for unittesting.
Elias Torres [Thu, 26 Nov 2009 05:30:58 +0000 (00:30 -0500)] 
Added the ability to stop an HTTPServer. Mostly for unittesting.

15 years agoStop parsing arguments after --
Ben Darnell [Wed, 3 Feb 2010 20:06:43 +0000 (12:06 -0800)] 
Stop parsing arguments after --

15 years agoFix EINTR exception handling for non-english locales.
Ben Darnell [Wed, 3 Feb 2010 20:05:03 +0000 (12:05 -0800)] 
Fix EINTR exception handling for non-english locales.

15 years agoSet headers earlier in StaticFileHandler, so we return the correct
Ben Darnell [Wed, 3 Feb 2010 19:56:57 +0000 (11:56 -0800)] 
Set headers earlier in StaticFileHandler, so we return the correct
content-type with 304 results (instead of always returning text/html)

15 years agoAdd static_url_prefix setting to allow serving of static files somewhere
Ben Darnell [Wed, 3 Feb 2010 19:49:32 +0000 (11:49 -0800)] 
Add static_url_prefix setting to allow serving of static files somewhere
other than /static/